Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    leggere nomi tabelle in db acces

    HO la necessità di leggere le tabelle presenti in un Db acces ma non riesco a trovare il modo di farlo.
    Ho trovato questo script ma non funziona:
    <%
    Function GetTables(dbPath)
    Dim cn, rs
    Set cn = Server.CreateObject("ADODB.Connection")
    cn.connectionstring = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source="&dbPath
    cn.Open()

    Set rs = cn.OpenSchema(adschematables)
    do while not rs.eof
    If Trim(rs("TABLE_TYPE"))="TABLE" then
    Response.Write(rs("TABLE_NAME")&"
    ")
    End If
    rs.MoveNext
    loop

    rs.close
    set rs = nothing
    rs.Close
    Set rs = Nothing
    cn.Close
    Set cn = Nothing
    End Function

    Dim dbPath
    dbPath = Server.MapPath("prova.mdb")
    GetTables(dbPath)
    %>


    mi restituisce questo errore:
    ADODB.Connection error '800a0cb3'

    Object or provider is not capable of performing requested operation.

    /test/amministrazione/inserimentodomande.asp, line 15

    La riga 15 è : Set rs = cn.OpenSchema(adschematables)
    Riuscite a darmi qualche indicazione?
    Grazie
    Marco

  2. #2

  3. #3

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.