Need help, if possible: "SQLSetConnectAttr failed" 
Author Message
 Need help, if possible: "SQLSetConnectAttr failed"

My deepest appologies, I think I'm crossposting in a few groups I shouldn't,
but I'm literally at wits-end. :)

Here's my problem:

I'm running a e-commerce/shopping cart product (VP-ASP) on my Windows NT 4.0
Server (SP6a) and the other day another dude came in and made some "driver
changes" and somehow managed to thrash the system in terms of database

I've been running the exact same settings and configuration options for this
shopping cart (will provide below) but after the incident, I no longer have
any ability to properly connect into the local database. It seems as if the
ODBC drivers themselves are messed up, but I wouldn't know how to look for
this. I'm still a relative newbie when it comes to doing databasing and
whatnot using ASP code. :)   The error codes (in full) are below, as well.

Either way, this is driving me absolutely crazy that this doesn't want to
work anymore! I'm about to reinstall NT Server to fix this mess (and also
fire this other dude), pretty soon.

I've read somewhere that this is a non-fatal error. If so, how could I
bypass it and move on with my life? :)

Thanks for any help, and I do mean any!

Jayson M. Sperling

**The error code:

[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed

*Okay, here's the current code I'm using:

Sub ProcessAccessOpen(connection)
dim dblocation
dim strconn
dim database
database=Session("db") & ".mdb"          ' database name
dblocation=session("dblocation")' location
If dblocation<>"" then
     database = Session("dblocation") & "\" & database
    end if
strconn = "DRIVER=Microsoft Access Driver (*.mdb);DBQ="&
' above string resolves to location of the database
'strconn = "DRIVER=Microsoft Access Driver

Set connection = Server.CreateObject("ADODB.Connection")
on error resume next strConn
If connection.errors.count> 0 then
   Session("Openerror")="<br><b>*Open Messages:</b><br><br>" &
connection.errors(0).description & " <br><br>" & Session("dbc") & "<br>"
end if

*I built a small piece of code that echos some of the variables back:

If DebuggingInfo <> 0 Then
debugwrite "<hr><font size='5'><b>Debug Writes:<br></font></b>"
debugwrite "<b><u>strconn:</u></b>" & strconn & "<br>"
debugwrite "<b><u>database:</u></b>" & database & "<br>"
debugwrite "<b><u>Session('Openerror')</u></b> " & Session("Openerror") &
debugwrite "<b><u>Session('DB')</u></b> " & Session("db") & "<br>"
debugwrite "<b><u>database</u></b> " & database & "<br>"
debugwrite "<b><u>Conn.Errors</u></b> " & "<br>"
if Conn.Errors.Count <> 0 Then
 For each errItem in Conn.Errors
  If errItem.NativeError <> 5701 Then
   debugwrite "NativeError " & errItem.NativeError
   debugwrite "Description " & errItem.Description
   debugwrite "SQLState " & errItem.SQLState
   debugwrite "Source " & errItem.Source
  End If
End If
End If
debugwrite "<hr><font size='5'><b>Local Errors:<br>"
debugwrite SQLSTATE
End Sub

*Output from above coding:

Debug Writes:

strconn:DRIVER=Microsoft Access Driver (*.mdb);DBQ=E:\vp-asp\shopping.mdb


*Open Messages:

[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed

Properties="DBQ=E:\vp-asp\shopping.mdb;Driver={Microsoft Access Driver
(*.mdb)};DriverId=281;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;"

Session('DB') shopping

database shopping.mdb


Sat, 04 Jan 2003 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. GetObject("","InternetExplorer.Application") fails in Excel VBA

2. GetObject("","InternetExplorer.Application") fails in Excel VBA

3. Help-"Error5-Logon Failed"-HELP PLease!!!!!!-Crystal Report

4. HELP: Custom Menubar/"Action Failed" msg

5. "The operation failed" - Help

6. HELP: "VBAJET32.DLL Failed to initialize..."

7. Help - ADO Errror 80004000 SQLSetConnectAttr failed

8. *"*-.,._,.-*"* I"LL TRADE VISUAL C++ FOR VBASIC *"*-.,_,.-*"*

9. Need help with "Invalid Argument"

10. need help about "null"

11. Need Help with "Average" function

12. Need help using the "Sendkeys" command


Powered by phpBB® Forum Software