| |
thunderchild
Posts: 4
Score: 0
Joined: 8/16/2005
Status: offline
|
hey I am tring to add data to a recordset. but i am getting the following error. Microsoft OLE DB Provider for ODBC Drivers (0x80040E21) Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <!--#include file="Connections/MyDatabase.asp" --> <% Dim NewUser Dim NewUser_numRows Set NewUser = Server.CreateObject("ADODB.Recordset") NewUser.ActiveConnection = MM_MyDatabase_STRING NewUser.Source = "SELECT * FROM Users" NewUser.CursorType = 3 NewUser.CursorLocation = 2 NewUser.LockType = 3 NewUser.Open() 'NewUser_numRows = 0 %> <% Dim conemail, NewID, NewFN, NewLN, NewUN, NewPass, NewEmail If Request("txtUserName") <> "" and Request("txtPassword2") <> "" and Request("txtPassword1") <> "" and Request("txtemail1") <> "" and Request("txtemail2") <> "" and Request("txtLName") <> "" and Request("txtfname") <> "" and Request("txtPassword1") = Request("txtPassword2") and Request("txtemail1") = Request("txtemail2") then session("MM_Password") = request.form("txtPassword1") ' ::: Setup the Variables NewID = NewUser.Fields.Item("UserID").value +1 NewFN = Request("txtFName") NewLN = Request("txtLName") NewUN = Request("txtUserName") newPass = Request("txtPassword1") NewEmail = Request("txtEmail1") ' ::: Find the Last Record ID and Add One NewUser.MoveLast ' ::: Add the new data NewUser.AddNew NewUser("UserID") = NewID ' NewUser.Fields.Item("FName") = NewFN ' NewUser.Fields.Item("LName") = NewLN ' NewUser.Fields.Item("UserName") = NewUN ' NewUser.Fields.Item("Password") = NewPass ' NewUser.Fields.Item("EmailAddress") = NewEmail NewUser.Update NewUser.Close 'response.redirect "UserLogin.asp" ' ::: No First name ::: This is only a snippet of the code. It looks right to me, But i might of missed something. The recordedset Cursor is Static and Lock Type is optimistic. I know that i only have one variable to add (at the moment), NewUser("UserID") , I have more to add once i get this one working. but it still produces the same error. Any help is appreciated. thanks Thunderchild
|
|