Urgent recordset problem

Results 1 to 2 of 2

Thread: Urgent recordset problem

  1. #1
    Join Date
    Dec 1969

    Default Urgent recordset problem

    I used the recordset method to add new item but it didn&#039;t work on some cases.<BR>Here is my code:<BR>set rs=Server.CreateObject("ADODB.Recordset")<BR>rs.op en table_name,conn,1,3<BR>rs.AddNew FieldsHead, FieldsValue<BR>rs.Update<BR>rs.MoveNext<BR>Next<BR ><BR>FieldsHead and FieldsValue are collections of data and there is a field named input_date and containing datetime type data. When I input "1/5/2001" with the above code, no data added in the database and no error messages. This event always happen in some cases such as "1/6/2001" but it works on many dates of april and I have tried "15/5/2001", it works. Also, I have tried not to use recordset method to input the data, it works all the time. <BR>It really urgent, pls help us, thx a lot

  2. #2
    Join Date
    Dec 1969

    Default RE: Urgent recordset problem

    Maybe you could try the vbscript cdate function to convert the string to a valid date before trying to update.

Posting Permissions

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