 |
| Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

August 5th, 2004, 06:00 PM
|
|
Authorized User
|
|
Join Date: Aug 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Trouble makink Connection - err(80004005)
Hi,
I'm new in Database programming. I have trouble opening a connection with ASP. I've done the set up with the ODBC driver. It does not matter which program I write or copy from books to learn from them, I keep having the same error number below with the following message :
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
/DatabaseConnect.asp, line 8
I've wrote a sample table with Microsoft Access with some entries that is stored in my web server's root. I've also included the adovbs.inc file in the root directory.
Here's is a sample of the connection string :
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DSN=WidgetWorld.dsn"
objConn.Open
I've tried dsn-less, different Open command and other lines of program, but I still get errors. It does the same errors with any other programs that I've tried.
I'm using :
(a)Microsoft Access 2000 as recommanded on a different computer (the mdb files are sent to the server root directory).
(b) IIS 4.0 and the web with NT4.0 server and SP6.
I'm suspecting a sort of setup on the web server, but I do not know what exactly.
Thanks in advance for your help
Ramez
__________________
Ramez
|
|

August 5th, 2004, 08:03 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Hi rameez,
You said that you are using Access 2000.
set objConn=server.createobject("ADODB.connection")
objConn.provider="Microsoft.Jet.OLEDB.4.0"
objConn.open server.mappath(dbname.mdb)
'the mdb file must be in the same folder where the current fileexists. If not, use appropriate method
server.mappath("../db/dbname.mdb")
|
|

August 6th, 2004, 10:25 AM
|
|
Authorized User
|
|
Join Date: Aug 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi rajanikrishna,
Thanks for replying. I've already tried the provider name "Microsoft.jet". With this provider name, I get a message saying it does not find the provider. I've been travelling on the web all the night to find a cure for this problem, and I found many, but none won't do good. The simple program I wrote finds my (mdb) file, but the problem itself I beleive is with the ODBC driver.
I'll keep looking. Thanks again.
Ramez
Quote:
quote:Originally posted by rajanikrishna
Hi rameez,
You said that you are using Access 2000.
set objConn=server.createobject("ADODB.connection")
objConn.provider="Microsoft.Jet.OLEDB.4.0"
objConn.open server.mappath(dbname.mdb)
'the mdb file must be in the same folder where the current fileexists. If not, use appropriate method
server.mappath("../db/dbname.mdb")
|
Ramez
|
|

August 6th, 2004, 03:49 PM
|
|
Authorized User
|
|
Join Date: Aug 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi,
I finally got the connection following your code. Actually what was missing on my IIS 4.0 server, is the Jet 4.0 from Microsoft which I've downloaded and put in Winnt/system32 with the .mdb File. It worked fine. I would like to put the .mdb file somewhere else on the same computer(IIS 4.0), on a different folder and hope being able to point to it with the proper Path.
Thanks again.
Quote:
quote:Originally posted by rajanikrishna
Hi rameez,
You said that you are using Access 2000.
set objConn=server.createobject("ADODB.connection")
objConn.provider="Microsoft.Jet.OLEDB.4.0"
objConn.open server.mappath(dbname.mdb)
'the mdb file must be in the same folder where the current fileexists. If not, use appropriate method
server.mappath("../db/dbname.mdb")
|
Ramez
|
|
 |