Adding new database record

Results 1 to 2 of 2

Thread: Adding new database record

  1. #1
    Join Date
    Dec 1969

    Default Adding new database record

    I discover that there are two methods when we do add new record through ASP, one is using the direct SQL Inser Into statement, another one is using the recordset.addnew, assigning values, then recordset.update. Is there any one know what is the difference between these two methods? What is their drawbacks?<BR><BR>Thankz and appreciate for all response....

  2. #2
    Lynn Maharet Guest

    Default RE: Adding new database record

    Hi there,<BR><BR>well, some fields in the database cannot be updated using the sql insert statement because of the field type. For ex, for Sql2K for datetime field you can&#039;t use the insert stat but need to use the rs.Update method.<BR><BR>One adv of using the insert statement is that it&#039;s less tedious because it&#039;s all in a sentence...can say that. For add new method you need to code in such a way one by one.<BR>Like<BR>rs("field1")= field1<BR>rs("field2")= on<BR><BR>For me I would prefer to use the sql insert statement..;)<BR>Hope it helps...<BR><BR><BR>

Posting Permissions

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