Database connection transactions.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tclancey

    #1

    Database connection transactions.

    Hi All.

    Just a quick question.

    I have a routine written called DoSql, it's a basic Sub that takes an SQL
    statement. It opens a connection places the text in a command, within a
    transaction, then commits the command to the database, ends the transaction,
    then closes the connection.

    This all works really well, but it's slow. I have a requirement to run
    (sometimes) many hundred Insert statements one after the other, each of
    which has to be immediately updated to assign a value depending on the
    returned scalar. I don't want to write special functions for the large
    loads, as it's pretty much random.

    I've found that if I don't put the commands in a transaction it's a lot
    quicker but I can't return the scalar correctly. Is there a faster way to
    do what I need?

    Cheers,
    Tull.


Working...