Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Join Date
    Oct 2004
    Location
    Louisiana
    Posts
    7

    Unanswered: 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 21:30.

  2. #2
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    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.

  3. #3
    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

  4. #4
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    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.

  5. #5
    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.

  6. #6
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    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.

  7. #7
    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?

  8. #8
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    could be. try installing the lastest MDAC

  9. #9
    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

  10. #10
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    happy to help. drop us a line if you need more help.

  11. #11
    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?

  12. #12
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    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?

  13. #13
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    just tried it myself without any success, give me a minute and I will look more...

  14. #14
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    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.

  15. #15
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •