Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 5th, 2004, 06:00 PM
Authorized User
 
Join Date: Aug 2004
Location: Montreal, Qu, Canada.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
  #2 (permalink)  
Old August 5th, 2004, 08:03 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

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")





Reply With Quote
  #3 (permalink)  
Old August 6th, 2004, 10:25 AM
Authorized User
 
Join Date: Aug 2004
Location: Montreal, Qu, Canada.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #4 (permalink)  
Old August 6th, 2004, 03:49 PM
Authorized User
 
Join Date: Aug 2004
Location: Montreal, Qu, Canada.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Connection String Trouble mat41 Classic ASP Basics 12 June 29th, 2008 07:53 PM
connection string to Oracle, Invalid Argument,err sparsh2010 Access VBA 1 February 14th, 2008 08:31 AM
Trouble Opening an Oracle Connection BrianWren Visual Basic 2005 Basics 0 August 31st, 2007 11:40 AM
Err with OLE Db Connection DARSIN General .NET 2 June 9th, 2005 11:21 PM
trouble with database connection databass Classic ASP Databases 1 August 15th, 2003 08:19 AM



All times are GMT -4. The time now is 09:57 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.