If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Driver's SQLSetConnectAttr failed

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-25-04, 20:27
zccm zccm is offline
Registered User
 
Join Date: Oct 2004
Location: Louisiana
Posts: 7
Driver's SQLSetConnectAttr failed

First off, I hope this is in the right section. I am sorry if it is not. I have been searching and reading for a few days now, but to no avail.

I am trying to learn asp. Have been messing with html and javascript a little while now, and have become interested. My company uses alot of this on our local intranet due to the amount of live data used accross the site.
I have found a tutorial, and cannot get it to work. It is close to what I want to learn to do. Basically I want to search a microsoft data base for parts and their location. But this is the closest thing I have found to learn with and I keep getting this error:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
/DaEngine.asp, line 14

I am trying to run this from my computer, as I am with some of my web pages. I am thinking that the problem may lie with the driver situation being that I am very unfamiliar with this aspect. I am including the zip file if anyone is interested in looking at it, or if someone knows a better code geared more towards what I am looking for. Any help would be greatly appreciated.

Here is the Zip file, if interested.
It is from Planet source code.
Much thanks,
Casey

Last edited by zccm; 10-25-04 at 20:30.
Reply With Quote
  #2 (permalink)  
Old 10-25-04, 20:54
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
Well you are trying to connect to a database using an ODBC dsn (data source name) called "Employees". I suspect your problem is that your have not created this dsn.
Reply With Quote
  #3 (permalink)  
Old 10-25-04, 21:15
zccm zccm is offline
Registered User
 
Join Date: Oct 2004
Location: Louisiana
Posts: 7
Sorry,

I failed to mention this. Went into Data Sources (ODBC), Clicked on System DSN, Added Microsoft Access Driver (*.mdb), pointed it to the db file, and named it "Employees". Hopefully this is all that I needed to do to create this DSN.

Thanks,
Casey
Reply With Quote
  #4 (permalink)  
Old 10-25-04, 21:17
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
In theory yes, that is all you need to do. I would check what driver you used as you may have selected the wrong one and I would open the database in access just to make sure it is not corrupt or anything.
Reply With Quote
  #5 (permalink)  
Old 10-25-04, 21:53
zccm zccm is offline
Registered User
 
Join Date: Oct 2004
Location: Louisiana
Posts: 7
Removed the driver and added it again. I also opened the db, looks fine. Still getting the same error.

Is there any other way of testing this. My host ftp site does not support this stuff.
Reply With Quote
  #6 (permalink)  
Old 10-25-04, 22:00
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
Okie. I just tried it here. Used "Microsoft Access Driver (*.mdb) - 4.00.6304.00" ODBC driver to create a System DSN (not a user dsn) and it worked prefectly.
Reply With Quote
  #7 (permalink)  
Old 10-25-04, 22:09
zccm zccm is offline
Registered User
 
Join Date: Oct 2004
Location: Louisiana
Posts: 7
Thanks, I see something, don't know if this is it or not.....your version is 4.00.6304.00.... mine is 4.00.6200.00. Do you think this may be it?
Reply With Quote
  #8 (permalink)  
Old 10-25-04, 22:11
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
could be. try installing the lastest MDAC
Reply With Quote
  #9 (permalink)  
Old 10-25-04, 22:54
zccm zccm is offline
Registered User
 
Join Date: Oct 2004
Location: Louisiana
Posts: 7
GOT IT,GOT IT,GOT IT.......
Updated with the latest service pack, but my version stayed the same (4.200.00). But it works, It works!!!
Now I can continue on with my learning after 3 days of 5 to 6 hours each of pulling my hair out. Thank you so much for hanging in there with me.

Thanks,
Casey
Reply With Quote
  #10 (permalink)  
Old 10-25-04, 22:56
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
happy to help. drop us a line if you need more help.
Reply With Quote
  #11 (permalink)  
Old 10-26-04, 00:38
zccm zccm is offline
Registered User
 
Join Date: Oct 2004
Location: Louisiana
Posts: 7
One more thing about this mess..... I have it working but, After I do a search, if I try to go back or re-open the window, and try to search again, I get an error. I have to wait about 30 seconds to a minute or so before I can search again. It's like its waiting on the connection to close or something.
What do you think this may be a result of?
Reply With Quote
  #12 (permalink)  
Old 10-26-04, 00:43
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
well the connections being closed but not set to nothing.... you might want to add
Code:
set rsGlobalWeb = nothing
set dbGlobalWeb = nothing
under these lines...
Code:
rsGlobalWeb.Close
dbGlobalWeb.Close
otherthen that I'm not sure. what is the error you are getting exactly?
Reply With Quote
  #13 (permalink)  
Old 10-26-04, 00:49
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
just tried it myself without any success, give me a minute and I will look more...
Reply With Quote
  #14 (permalink)  
Old 10-26-04, 00:58
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
replace this
Code:
dbGlobalWeb.Open("Employees")
with.....
Code:
With dbGlobalWeb
	 .ConnectionTimeout = 15
	 .CommandTimeout = 30
	 .ConnectionString = "DSN=Employees"
	 .Open
End With
it'll fix the problem. the error has something to do with the way the connection is being created but exactly what I am not sure.
Reply With Quote
  #15 (permalink)  
Old 10-26-04, 01:10
zccm zccm is offline
Registered User
 
Join Date: Oct 2004
Location: Louisiana
Posts: 7
Thanks,
Man ur good. I feel good though, I at least suspected that it was something to do with the connection. lol

thx
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On