Subject | Parallel transactions not supported. |
---|---|
Author | Ghanshyam |
Post date | 2003-07-03T09:40:03Z |
Hello,
My code is something like :
conn.Open()
Dim myTxn As FbTransaction = conn.BeginTransaction()
cmd = New FbCommand(qry, conn, myTxn)
rd = cmd.ExecuteReader()
while (rd.read())
if (condition) then
....
cmd1 = New FbCommand(qry1, conn, myTxn)
cmd1.ExecuteReader()
else
....
cmd2 = New FbCommand(qry2, conn, myTxn)
cmd2.ExecuteReader()
end if
End while
If I am using different transactions for different queries &
commands, I am getting following error -
"A transaction is currently active. Parallel transactions are not
supported."
I can use the same transaction(myTxn) for all commands
(cmd,cmd1,cmd2). But, it needs to close the previous ExecuteReader()
command - which I can't afford, since it will not fullfill my
requirement (while rd.read ...)
All the queries are different.
Can any one plz suggest me the way to execute different transactions
parallely or to use the same transaction for different queries in the
situation like above.
Thanks in advance.
Regards,
Ghanshyam.
My code is something like :
conn.Open()
Dim myTxn As FbTransaction = conn.BeginTransaction()
cmd = New FbCommand(qry, conn, myTxn)
rd = cmd.ExecuteReader()
while (rd.read())
if (condition) then
....
cmd1 = New FbCommand(qry1, conn, myTxn)
cmd1.ExecuteReader()
else
....
cmd2 = New FbCommand(qry2, conn, myTxn)
cmd2.ExecuteReader()
end if
End while
If I am using different transactions for different queries &
commands, I am getting following error -
"A transaction is currently active. Parallel transactions are not
supported."
I can use the same transaction(myTxn) for all commands
(cmd,cmd1,cmd2). But, it needs to close the previous ExecuteReader()
command - which I can't afford, since it will not fullfill my
requirement (while rd.read ...)
All the queries are different.
Can any one plz suggest me the way to execute different transactions
parallely or to use the same transaction for different queries in the
situation like above.
Thanks in advance.
Regards,
Ghanshyam.