vb2003 and Sqlbase

P

Peter Lux

I'm writing a query tool using vb and Sqlbase and noticed that when I do a
'non-query' statement, it automatically commits. I'd like to have it wait
until a 'commit' is issued before the commit. I thought you had to do this
in a transaction. I changed the code to do a transaction, but now when I
issue the commit, it gives me an 'XACT_E_NOTSUPPORTED(0X8004D00F) error.
Heres the code..

If LTrim(LCase(Mid(tc1.Text, 1, 6))) = "commit" Then
MsgBox(trans.IsolationLevel.ToString)
Try
trans.Commit()
Catch ex As Exception
MsgBox(ex.Message)
End Try
ElseIf LTrim(LCase(Mid(tc1.Text, 1, 6))) = "rollback" Then
Try
trans.Rollback()
Catch ex As Exception
MsgBox(ex.Message)
End Try
Else
trans = hQuest.BeginTransaction(IsolationLevel.ReadCommitted)
sCommand.Transaction = trans
MsgBox(trans.IsolationLevel.ToString)
Try
nRows = sCommand.ExecuteNonQuery()
sb.Text = nRows.ToString & " row(s) affected"
Catch ex As Exception
MsgBox(ex.Message)
End Try
End If

I've tried various Isolation level changes and don't get anything. Any
clues??
 
P

Peter Lux

If I want to issue a rollback or commit sql statement, do I executeScaler or
ExecuteNonQuery?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top