473,320 Members | 1,950 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Error Type: ADODB.Recordset (0x800A0BCD) Help!

All i am doing is trying to write info to a access database but iget this error

Error Type:
ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/AF_Load_Process_Registration.asp, line 40

here is my code:

<%
Response.Expires = -1000 'Makes the browser not cache this page
Dim objConn

'Connect to database (AF.mdb)
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.Mappath("CommandCenter/Database/AF.mdb")

%>

<%
Dim strFirstName, strLastName, strEmail, nameArray, strPassword, strUserName
Dim strSubject
Dim strMessage
Dim Mailer
Dim vbcrlf
Dim strError, intErrorCount
Dim strUserID, temp1, temp2
vbcrlf = chr(13) & chr(10)
strFirstName = Request.Form("First Name")
strLastName = Request.Form("Last Name")
temp1 = Mid(strLastName,1,3)
temp2 = Mid(strFirstName,1,3)
strUserID = Session("UserName")

'Add User to Database
dim strSQL
strSQL = "SELECT * FROM Load;"
dim objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.open strSQL, objConn, adOpenForwardOnly, adLockOptimistic,adCmdText

'objRS.AddNew
'objRS("TimeSubmit") = Now() <-----LINE 40
'objRS("UserName") = strUserID
objRS("Date Available") = Request.Form("date")
objRS("Origin City") = Request.Form("OC")
objRS("Origin St") = Request.Form("OS")
objRS("Destination") = Request.Form("DC")
objRS("Destination St") = Request.Form("DS")
objRS("Truck Type") = Request.Form("trucktype")
objRS("Load Size") = Request.Form("loadsize")
objRS("Length") = Request.Form("length")
objRS("Quantity") = Request.Form("quantity")
objRS("Comments") = Request.Form("comments")
objRS.Update
objRS.Close
set objRS = Nothing

Some please help, its a simple mitake i am making i know..i checkd the access table..that is fine..i did not spell anything..also the access table is arranged in the same order in which i am writing to it..ie col 1 is timesubmit, col2 is username...etc
May 1 '07 #1
2 2160
jhardman
3,406 Expert 2GB
Why is the addNew line commented out? Surely you need this line to execute correctly. Did you comment out those lines and then forget to put them back?

Jared
May 1 '07 #2
JamieHowarth0
533 Expert 512MB
Hey,

As a small PS to Jared's note - if the code still doesn't work, check that your IUSR_MACHINENAME account has write access to the database file in question. Personally, I'd also look at using an SQL INSERT INTO statement as I've had problems using the AddNew method. Subsequently, I tend to separate my processing and data sections so my SQL code deals exclusively with database stuff and my VBScript displays/manipulates it.

Hope this helps!

medicineworker
May 2 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Chuck | last post by:
Hi! I have a ASP page that generates an excel report. It works fine if there are records found, however, if no records are found I would like to call the below listed function instead of getting...
1
by: Jack | last post by:
Hi, I am trying to add a new record to a main page. This page is the processing page to a form. However, I am getting the following error message: Error Type: ADODB.Recordset (0x800A0BB9)...
1
by: Robert | last post by:
Hello, Is there sombody who can tel me what kind of error this is, and how i can fix it. This is the error: ADODB.Field (0x800A0BCD) Either BOF or EOF is True, or the current record has...
3
by: amitbadgi | last post by:
Hi I am converting an asp applicattion to asp.net, and I am getting an error as follows, Exception Details: System.Runtime.InteropServices.COMException: Type mismatch. Source Error: Line...
1
by: Kosmös Pollard | last post by:
Hey guys, I'm rather new to access and can not seem to figure out what is wrong with this code I will post below...but first...it was working perfectly fine before I added this: recSet2.Edit...
1
by: mudasserrafiq | last post by:
I am using following asp file default.asp <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <META http-equiv=Content-Type content="text/html; charset=windows-1252"> <META content="0...
3
by: Kosmos | last post by:
Hey ya'll...I can't seem to figure out why I'm getting this error message, but it all started when I added the new line of code with the recSet5.AddNew --- when I ran the first line, the logic worked...
2
by: colesslow | last post by:
i have these asp files to edit a record in my sql server..but it can't be done. the error is Error Type: ADODB.Recordset (0x800A0E7D) The connection cannot be used to perform this operation. It...
1
by: shivasusan | last post by:
Hi Friends! Please Help me! How i can solve this error? Please explain me, what is the error and how to solve? Error Type: ADODB.Recordset (0x800A0E7D) The connection cannot be used to...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.