Database add problem(advanced)

Results 1 to 2 of 2

Thread: Database add problem(advanced)

  1. #1
    Join Date
    Dec 1969

    Default Database add problem(advanced)

    I have a form that gets filled in, the user has the option to leave some fields blank, which will be filled automatically if they get left blank.<BR><BR>This is how my add code looks like, but everytime I try add it and submit the form, it gives me this error :<BR>ADODB.Recordset (0x800A0BB9)<BR>Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.<BR><BR>This is my code, could you guys maybe help me?!<BR><BR>Set objRecordset = Server.CreateObject("ADODB.Recordset")<BR><BR>objR ecordSet.Source = "ActLog"<BR>objRecordSet.ActiveConnection = Connect<BR>objRecordSet.CursorType = adOpenKeyset<BR>objRecordSet.LockType = adlockPessimistic<BR>objRecordSet.Open<BR><BR>objR ecordSet.Addnew<BR><BR>If Request("DateHandled") &#060;&#062; "" then<BR>objRecordSet.Fields("Datehandled") = Request("Datehandled") <BR>else<BR> objRecordSet.Fields("Datehandled") = Now()<BR>End If<BR><BR>objRecordSet.Fields("Status") = Request("Status")<BR>objRecordSet.Fields("Solution ") = Request("Solution")<BR>objRecordSet.Fields("Act_De scProb") = Request("Act_DescProb")<BR><BR>If Request("EndTime") &#060;&#062; "" Then<BR>objRecordSet.Fields("EndTime") = Request("EndTime")<BR> else<BR> objRecordSet.Fields("EndTime") = Time()<BR>End If<BR><BR>objRecordSet.Fields("StartTime") = Request("StartTime")<BR>objRecordSet.Fields("Compa ny_ID") = Request("Company_ID")<BR>objRecordSet.Fields("ActC at_ID") = Request("ActCat_ID")<BR>objRecordSet.Fields("Emp_I D") = Request("Emp_ID")<BR><BR>If Request("Status") = 1 then<BR>objRecordSet.Fields("FollowUP_Emp_ID") = Request("Followup_Emp_ID")<BR>objRecordSet.Fields( "DateReq") = Request("DateReq")<BR>Else<BR> objRecordSet.Fields("FollowUP_Emp_ID") = ""<BR> objRecordSet.Fields("DateReq") = ""<BR>End If<BR><BR>objRecordSet.Update<BR>objRecordSet.Clos e<BR>Set objRecordSet = Nothing <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Database add problem(advanced)

    Play around with your cursor and lock types.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts