which is the better way...!!!

Results 1 to 2 of 2

Thread: which is the better way...!!!

  1. #1
    mythili Guest

    Default which is the better way...!!!

    Which is the better way of inserting records into the database?<BR>With recordSet.AddNew() & update the values<BR>OR <BR>conn.execute("Insert into table ..")<BR><BR>If it is, what are the advantages of using the better one and what are the disadvantages of the latter one?<BR><BR>thanks in advance.<BR>

  2. #2
    Jason Miller Guest

    Default I use Insert Into...

    But that&#039s mostly because I prefer short code. In reality, I&#039ve got a "doSQL" function which I pass a string to and it tells me if it worked or not (as well as what it thought I asked it to do). But I&#039m also one of those people who grew up on a command prompt...<BR><BR>I can also grant that, when tracking down a database oddity (for the youngsters out there), the .addNew style is easier to break apart and debug.<BR><BR>But in terms of being concise and reusable, the "insert into" is my choice. The other serious advantage (which I just remembered) is that the "insert into" doesn&#039t require an open recordset, just a connection. Meanwhile, .addnew (as I recall) wants requires an editorial lock on its recordset (additional to the connection to database).

Posting Permissions

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