Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting error in ASP with ODBC
Message
De
29/12/1999 22:22:23
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Titre:
Getting error in ASP with ODBC
Divers
Thread ID:
00310203
Message ID:
00310203
Vues:
52
I've got a strange one here.

I have a web site that pull information from an Access database. I know, some would say that is my problem already. It's strange because the home page of the web site gets an error:

Error number = 0
Description = [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
Error Source = Microsoft OLE DB Provider for ODBC Drivers
Native Error = 0
SQL State = IM006


...but other pages on the site pull from the same database using basically the same connection method...and they work. I connect like this:

Dim objConnect
Dim objRecords
Dim sqlQuery

Set objConnect = Server.CreateObject("ADODB.Connection")
Set objRecords = Server.CreateObject("ADODB.Recordset")

sqlQuery = "SELECT * FROM mytable"

objConnect.Open "MyODBC", "myuser", "mypass"
objRecords.Open sqlQuery, objConnect

If objConnect.Errors.Count <> 0 Then
Response.Write "Everything's cool!"
Else
Response.Write "ERROR!"
End If

Like I said...all the other pages in the site use this generic open routine...but the home page returns the error above. The error occured at the objConnect.Open call so it's not a problem with my SQL statement.

This one's got me stumped. I've been messing with this for about two days with no success. If you want to see the page in action, here's the URL:

www.lookingup.org

Any help would be great! Thanks much.

-Joe Kimbler
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform