Originariamente inviato da ftarsia
Salve,
sto lavorando con Vista.
Non riesco a far visualizzare una tabella di un DB.
Il web server mi da questo errore:
Connessione aperta con il database: C:\inetpub\wwwroot\Magazzino.mdb
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\inetpub\wwwroot\Magazzino.mdb;Persist Security Info=False
An error occurred on the server when processing the URL. Please contact the system administrator
Sembra che la connessione ci sia.
Con Win 2000 funzionava tutto alla perfezione.
C'è forse qualcosa nel codice che non va?
Il codice è il seguente:
Dim cn, rs, strcn, strSQL, DataBase
Set cn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
DataBase = Server.mapPath ("Magazzino.mdb")
Response.Write "Connessione aperta con il database: " & DataBase & "
"
strcn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DataBase & ";Persist Security Info=False"
strSQL = "SELECT codice, descr, prezzo FROM articoli ORDER BY codice"
Response.Write strcn & "
"
cn.Open strcn
rs.Open strSQL, cn
If Not rs.EOF Then
Do While Not rs.EOF
Response.Write(rs.Fields("Codice").Value & " - " & rs.Fields("Descr").Value & " - " & rs.Fields("Prezzo").Value& "
")
rs.MoveNext
Loop
Else
Response.Write("Nessun record trovato ...")
End If
rs.Close
cn.Close
Saluti