Insert Succecss/Fail Checking?

Results 1 to 2 of 2

Thread: Insert Succecss/Fail Checking?

  1. #1
    Ed Husar Guest

    Default Insert Succecss/Fail Checking?

    I know this might be a bit basic but I need help. I have an Insert form and need to tell if the record was inserted successfully and then display a message for the successful insert or a failed insert.<BR><BR>Thanks in advance,<BR><BR>Ed

  2. #2
    Neil Popham Guest

    Default RE: Insert Succecss/Fail Checking?

    I believe there is similar facility with other methods, but this is the way I would choose, if using an UPDATE, INSERT or DELETE SQL statement:<BR><BR>&#062; Set objCommand=Server.CreateObject("ADODB.Command")<BR >&#062; objCommand.ActiveConnection=strConnect<BR>&#062; objCommand.CommandText=strSQL<BR>&#062; objCommand.CommandType=adCmdText<BR>&#062; objCommand.Execute intRecords<BR>&#062; Set objCommand=Nothing<BR><BR>the variable &#039intRecords&#039 will be passed the number of records affected

Posting Permissions

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