Add New Record

Results 1 to 2 of 2

Thread: Add New Record

  1. #1
    Duc Guest

    Default Add New Record

    Hi I am getting this error When I tried to add a new record Can someone please give me a hint.<BR>Microsoft OLE DB Provider for SQL Server error &#039;80040e21&#039; <BR><BR>Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. <BR><BR>/PISANetwork/forum/finalpost.asp, line 24 <BR>&#060;%<BR> Dim ObjConn<BR> Dim ObjRs<BR> Dim Title,BriefDescription, Message, Author, StrConn, StrSQL<BR> <BR> Set ObjRs = Server.CreateObject("ADODB.RecordSet")<BR> StrConn = "Provider=SQLOLEDB; Data Source=Compton; Initial Catalog=forum; User Id=sa; password="<BR> <BR> Title = Request("txtSubject")<BR> BriefDescription = Request("txtDescription")<BR> Message = Request("txtBody")<BR> Author = Request("txtName")<BR> <BR> ObjRs.Open "message", StrConn, 3,3<BR> ObjRs.AddNew <BR> ObjRs("Msg_Title") = Title<BR> ObjRs("Msg_Description") = BriefDescription<BR> ObjRs("Msg_Body") = Message<BR> ObjRs("Msg_Author")= Author<BR> ObjRs("Msg_PostedDate") = Now()<BR> ObjRs.Update <BR> ObjRs.Close <BR> Set ObjRs = Nothing<BR> <BR>%&#062;<BR>

  2. #2
    Join Date
    Dec 1969

    Default Have you tried ....

    changing<BR>ObjRs("Msg_PostedDate") = Now()<BR>to<BR>ObjRs("Msg_PostedDate") = Now<BR><BR>"Now" is a resevreds word

Posting Permissions

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