Go Back  Xtreme Visual Basic Talk > Other Languages > Web Programming > ADODB.Recordset error '800a0cc1' (definately not a typo)


Reply
 
Thread Tools Display Modes
  #1  
Old 05-13-2004, 11:15 AM
VolodyAnarchist's Avatar
VolodyAnarchist VolodyAnarchist is offline
Centurion
 
Join Date: Feb 2003
Posts: 136
Default ADODB.Recordset error '800a0cc1' (definately not a typo)


I get Error in the second to last line in
Code:
	objRS.CursorLocation = adUseServer
	objRS.CursorType = adOpenKeyset
	objRS.LockType = adLockOptimistic
	objRS.Open "Forum Entry", objConn, , , adCmdTable

	objRS.AddNew
	If(strSubject <> "") Then objRS("Subject") = strSubject
	objRS("Login ID") = "Unknown"
When i've commented out that line, the error simply moves to the next line. I am positive that both fields exist, and that the table exists. I've also tried full version of objRS.fields("Subject").value = strSubject, but it did not help.
__________________
"If we don't believe in freedom of expression for people we despise, we don't believe in it at all." ~ Noam Chomsky

Anarchopedia Freenet Electronic Frontier Foundation
Reply With Quote
  #2  
Old 05-13-2004, 01:37 PM
PWNettle PWNettle is offline
Verbose Coder

Retired Moderator
* Guru *
 
Join Date: Dec 1999
Location: Phoenix, Arizona
Posts: 3,011
Default

One possible problem could be the ADO constants...

Are you using option explicit in your page?

Code:
<% Option Explicit %>
And/or do you have the ADO constants included in your page? (I'm not sure how you do it, but they aren't known to your ASP by default).

Using option explicit would cause errors to occur if the ADO constants aren't defined. You could always use the numeric values instead of the constants.

Paul

PS - I guess I should mention that all of this is assuming you're doing this in ASP!

Last edited by PWNettle; 05-13-2004 at 01:44 PM.
Reply With Quote
  #3  
Old 05-13-2004, 02:44 PM
wayneph's Avatar
wayneph wayneph is offline
Web Junkie

Retired Moderator
* Expert *
 
Join Date: Apr 2004
Location: D/FW, Texas, USA
Posts: 8,393
Default

Exactly what error are you getting. You're just telling us that you get one.

You could also be using a non-updatable query. What does your SQL Statemnt look like that you are using to create your recordset. If it contains more than one table you can't add to it using the rs.AddNew.
__________________
-- wayne, MSSM Retired
> SELECT * FROM users WHERE clue > 0
0 rows returned
Reply With Quote
  #4  
Old 05-14-2004, 03:50 AM
VolodyAnarchist's Avatar
VolodyAnarchist VolodyAnarchist is offline
Centurion
 
Join Date: Feb 2003
Posts: 136
Default

Quote:
Originally Posted by wayneph
Exactly what error are you getting. You're just telling us that you get one.

You could also be using a non-updatable query. What does your SQL Statemnt look like that you are using to create your recordset. If it contains more than one table you can't add to it using the rs.AddNew.
It was an error saying that the field doesn't exist. I've solved that problem with recreating the ODBC connection (for some reason it was reading field names from older version of the database, while accessing the new one... ???). But now i have another problem When i do update on the RecordSet i get an error saying that the DataBase is ReadOnly. However, i open in with adLockOptimistic (ie. not read only).
Also i've tried to write a dummy SQL statement that simply inserts some values in the recordset, SQL runs while in Access, but when i .Execute it from ASP script i get the error also. Is there something that you know that might put me in the right direction?
__________________
"If we don't believe in freedom of expression for people we despise, we don't believe in it at all." ~ Noam Chomsky

Anarchopedia Freenet Electronic Frontier Foundation
Reply With Quote
  #5  
Old 05-14-2004, 07:22 AM
alp0001's Avatar
alp0001 alp0001 is offline
Xtreme Tester

Retired Moderator
* Expert *
 
Join Date: Jan 2002
Location: Round Lake Heights, IL
Posts: 2,818
Default

What about Paul's advice? Are you defining all the ADO constants somewhere?
__________________
Avatar by the very talented member: lebb
Reply With Quote
  #6  
Old 05-14-2004, 07:23 AM
wayneph's Avatar
wayneph wayneph is offline
Web Junkie

Retired Moderator
* Expert *
 
Join Date: Apr 2004
Location: D/FW, Texas, USA
Posts: 8,393
Default

You mentioned that you opened it with LockOptimistic. I'm assuming that you're still using KeySet since that was from your initial question. Try using adOpenStatic instead. See if that helps.

If you are using Access:
Make sure that the internet user has write permission on the directory that your database is in. It won't work for just the file because it also needs to create the .ldb Lock file.

If you are using SQL Server:
Make sure the user you are using has proper permissions to the tables you are attempting to write to.

Other than that post the code where you create your connection (take out a password), create your recordset, and update your recordset. There may be something else that we're missing...
__________________
-- wayne, MSSM Retired
> SELECT * FROM users WHERE clue > 0
0 rows returned
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB.recordset properties 4 a multi-user envirnoment? chill freak Database and Reporting 7 03-23-2004 06:19 AM
Pass adodb.recordset and retrieve fieldnames Wolfert Database and Reporting 2 07-03-2003 05:57 AM
Error Log Anis General 6 11-28-2001 04:56 AM
Link a DataControl to a ADODB.RecordSet sethindeed Database and Reporting 5 08-24-2001 10:52 AM
Please help .... new123 General 2 06-01-2001 08:23 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->