On 7/6/05, Kiel W. <[EMAIL PROTECTED]> wrote:
> >set tran_string "BEGIN TRANSACTION\n"
> >foreach ...
> >append tran_string "<my-insert-statement>\n"
> >append tran_string "END TRANSACTION\nCOMMIT TRANSACTION"
> >DB eval "$tran_string"
>  Ray,
>  Someone may pipe in to correct me, but this is my understanding..
>  BEGIN TRANSATION, END TRANSACTION and COMMIT TRANSACTION could be
> considered three seperate sql statements. Meaning, you /could/ send them as
> three seperate execute( ) 's. However, it would be /much/ better to send
> larger chunks of sql code to an execute, seperating them by semi-colens ( ;
> ).
>  I'm not familiar with Tcl/Tk but I /think/ your code would be fine as long
> as you end each statement (including what I mentioned above). I could be
> entirely off base, but its something to try until someone else gives some
> input.

They are separate sql statements, but being careful I would check to make
sure they actually did work when executing them. You can do something
reasonable if they fail instead of just crashing.

Reply via email to