vb2003 and Sqlbase

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

    #1

    vb2003 and Sqlbase

    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_NOTSUPP ORTED(0X8004D00 F) error.
    Heres the code..

    If LTrim(LCase(Mid (tc1.Text, 1, 6))) = "commit" Then
    MsgBox(trans.Is olationLevel.To String)
    Try
    trans.Commit()
    Catch ex As Exception
    MsgBox(ex.Messa ge)
    End Try
    ElseIf LTrim(LCase(Mid (tc1.Text, 1, 6))) = "rollback" Then
    Try
    trans.Rollback( )
    Catch ex As Exception
    MsgBox(ex.Messa ge)
    End Try
    Else
    trans = hQuest.BeginTra nsaction(Isolat ionLevel.ReadCo mmitted)
    sCommand.Transa ction = trans
    MsgBox(trans.Is olationLevel.To String)
    Try
    nRows = sCommand.Execut eNonQuery()
    sb.Text = nRows.ToString & " row(s) affected"
    Catch ex As Exception
    MsgBox(ex.Messa ge)
    End Try
    End If

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


  • Peter Lux

    #2
    Re: vb2003 and Sqlbase

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


    "Peter Lux" <pete.lux@thehe ritagegrp.com> wrote in message
    news:OUgcEr$gGH A.4864@TK2MSFTN GP05.phx.gbl...[color=blue]
    > 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_NOTSUPP ORTED(0X8004D00 F) error.[/color]


    Comment

    Working...