ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 9th, 2003, 07:12 AM
halo_seven halo_seven is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Newcastle, NSW Aust.
Posts: 7 halo_seven User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Database Connection error of some sort

Im new to these boards and I was just reading the posting rules so I hope Ive done this ok...

All Im after is a simple explanation as to what this ASP error message means?

ADODB.Connection.1 error '800a0bb9'.

The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.


All help is greatly appreciated..

**halo_seven**

Reply With Quote
  #2  
Old February 9th, 2003, 05:43 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Posts: 2,056 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 44 m 22 sec
Reputation Power: 0
It means that your connection/opening settings to the database may contain an error.

Show us that bit of your code and we should be able to suss out the problem.

Reply With Quote
  #3  
Old February 9th, 2003, 07:47 PM
halo_seven halo_seven is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Newcastle, NSW Aust.
Posts: 7 halo_seven User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Im not really up on this so I hope I've given u the right code, or at least enough of it..

PHP Code:
 Set Conn Server.CreateObject("ADODB.Connection")
error here-->   Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" Server.MapPath("feedback.mdb"


Ive had this code work with a different server.

The database file is in the same folder, and according to the help from the webhost, I dont need a special folder or anything for ASP.

Thanks again.

Reply With Quote
  #4  
Old February 9th, 2003, 08:00 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Posts: 2,056 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 44 m 22 sec
Reputation Power: 0
That part looks ok. I think the error is occurring once you try to do something w/ the recordset. Post that code - the bit where you set and open the recordset.

Reply With Quote
  #5  
Old February 9th, 2003, 09:57 PM
halo_seven halo_seven is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Newcastle, NSW Aust.
Posts: 7 halo_seven User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sorry to post so much code... Its a bit confusing with the colours as well... but I used a script that had descriptions of what each line was...

Anyway, I hope u can help

PHP Code:
<%
'Dimension variables'
Dim adoCon              'Holds the Database Connection Object'
Dim rsAddComments   'Holds the recordset for the new record to be added'
Dim strSQL               'Holds the SQL query to query the database' 

Set adoCon Server.CreateObject("ADODB.Connection")

adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" Server.MapPath("feedback.mdb")

'Create an ADO recordset object'
Set rsAddComments Server.CreateObject("ADODB.Recordset")

'Initialise the strSQL variable with an SQL statement to query the database'
strSQL "SELECT tblFeedback.Name, tblFeedback.Comments, tblFeedback.Email, tblFeedback.Date, tblFeedback.Find  FROM tblFeedback;" 
 
'Set the cursor type we are using so we can navigate through the recordset'
rsAddComments.CursorType 2

'Set the lock type so that the record is locked by ADO when it is updated'
rsAddComments.LockType 3

'Open the recordset with the SQL query'
rsAddComments.Open strSQLadoCon 

Reply With Quote
  #6  
Old February 10th, 2003, 11:59 AM
numbernine numbernine is offline
Up To His Eyes In Ads
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Chicago
Posts: 160 numbernine User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 25 sec
Reputation Power: 16
It looks okay to me, but I would try it without the "CursorType" and without the "LockType". You don't need to lock the data since you're not updating it--you're selecting and you don't need a dynamic cursor since all web content is stateless.

Reply With Quote
  #7  
Old February 11th, 2003, 05:41 AM
halo_seven halo_seven is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Newcastle, NSW Aust.
Posts: 7 halo_seven User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The asp code is actually supposed to update a database so i think those lines are supposed to stay there, but my knowledge on this is extremely limited so i took it out anyway to see what would happen and I still recieved the same error message.

I would add the rest of the code here for you to see but I dont think its necessary since the error is happening right up the top. Its a very simple feedback form script.

And I am also receiving the same error for a login script I had. Both of these worked on a different server.

Thanks for your help guys, really appreciate it. Any more ideas... chuck em this way... my client is getting a tad impatient..

Reply With Quote
  #8  
Old February 12th, 2003, 09:36 PM
aspnewbie aspnewbie is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: The Great White North
Posts: 361 aspnewbie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 50 sec
Reputation Power: 16
Send a message via MSN to aspnewbie
According to ASPFAQ, the error message is because you're using vbfriendly scripts and they suggest including adovbs.inc. But you are setting them as constants, so I can't think that is the problem.

http://www.aspfaq.com/show.asp?id=2102

Whenever I have a error message that I can't figure out, I type it in their search engine and *usually* I get some good insight (not in this case, it would seem!)

What if you were to comment out your lock types and instead have

rsAddComments.Open strSQL, adoCon, 2, 3

What engine do you have installed? If you have a 4.0 Jet engine then you could try using this connection string instead of an ODBC connection.

adoCon="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="
adoCon=adoCon & server.mappath("feedback.mdb") & ";"

Reply With Quote
  #9  
Old February 13th, 2003, 10:46 PM
halo_seven halo_seven is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Newcastle, NSW Aust.
Posts: 7 halo_seven User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Ok, I just tried commenting out those lines etc as you said but that didnt seem to make a difference so Im willing to try ur next suggestion aspnewbie.

When u say 'do i have 4.0 Jet Engine', what exactly does that mean? Sorry to sound completely clueless.... but well I am

Thanks again for your wonderful help everyone.

Reply With Quote
  #10  
Old February 14th, 2003, 01:59 PM
aspnewbie aspnewbie is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: The Great White North
Posts: 361 aspnewbie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 50 sec
Reputation Power: 16
Send a message via MSN to aspnewbie
If I remember correctly, it's the database engine that's shipped with Access. Access 2000 uses v. 4.0.

What version of Access are you using? Is it the same on both servers?

Reply With Quote
  #11  
Old February 14th, 2003, 06:10 PM
halo_seven halo_seven is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Newcastle, NSW Aust.
Posts: 7 halo_seven User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
im using access 2002... on the first server i uploaded my website to, it all worked fine.. and i uploaded the exact same thing to this latest server but it doesnt work..

they do support asp and all that..

Reply With Quote
  #12  
Old February 14th, 2003, 08:14 PM
aspnewbie aspnewbie is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: The Great White North
Posts: 361 aspnewbie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 50 sec
Reputation Power: 16
Send a message via MSN to aspnewbie
okay, I think Access 2002 works with 4.0 as well. So try that connection string, I listed above.

If that doesn't work try using the actual path name to the db instead of server.mappath.

adoCon="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=c:/databasefolder/databasename"

If that doesn't work, double check that you are properly calling your db connection object. Once I used one variable in setting up the connection (dbConn) and a different one in calling the database (dcnDB) and I got that error. If your code is identical to what you wrote above, I don't see that error though.

Then double check that all of your fields in your strSQL are valid fields in your db.

Instead of using rsAddComments.Open strSQL, adoCon, you could always try rsAddComments = adoConn.Execute(strSQL)

Last edited by aspnewbie : February 14th, 2003 at 08:17 PM.

Reply With Quote
  #13  
Old February 18th, 2003, 03:48 AM
halo_seven halo_seven is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Newcastle, NSW Aust.
Posts: 7 halo_seven User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
im still not having any luck... i might have to resort to one of those annoying ready-made guestbooks for the moment.

thanks for all your help anyway people!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Database Connection error of some sort


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap