Hi, all!

     In a message dated 1/17/07 1:01:04 PM, Tim Jones
writes:

> I added exactly one line to my existing code:
> 
>     App.CatalogDB.SQLSelect("begin transaction")
> 
> With that line inserted, things speed up dramatically.
> By removing it, the import crawls. However. I get
> the transaction log in either case.
> 
     With all the talk about putting an begin-transaction
command at the start of REALSQLDatabase transactions,
may I ask whether or not an end-transaction command
is also needed? If so, where does it belong? I imagine
the sequence is something like the following.

     App.CatalogDB.SQLSelect("begin transation")

     newbie = new DatabaseRecord
     newbie.column("LastName") = "Kelley"
     newbie.column("FirstName") = "Charles"
          .
          .
          .
     App.CatalogDB.InsertRecord "Patrons", newbie
     if error <> 0 then
          App.CatalogDB.Commit
     else
          MsgBox "There's a mistake in adding this record!"
     end if

     App.CatalogDB.SQLSelect("end transaction")

     Is this correct?

     I do presume that one can loop through a bunch of database
transactions and add the begin-tranaction command and the
end-transaction command before the loop begins and after
the loop ends, respectively, so that the transactions
pile up, as it were, and then are recorded en masse instead
of committing (and recording) transactions one at a time.
I expect the latter can consume a lot of time.

     -- Charles Kelley, [EMAIL PROTECTED]
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to