By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,581 Members | 1,990 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,581 IT Pros & Developers. It's quick & easy.

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

P: 1
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
Share this Question
Share on Google+
2 Replies


jhardman
Expert 2.5K+
P: 3,405
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

codegecko
Expert 100+
P: 533
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

Post your reply

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