Today I got an error message when I tried to connect to an RDB data server through the ADO.NET ODBC brigde surrounded in a System.transaction. I'm using the ODBC driver for Oracle 3.02
So the following piece of code gives an error
Using tx As New TransactionScope
Using con As New Odbc.OdbcConnection
con.ConnectionString = "Driver={Oracle RDB Driver};server= ......"
con.Open()
' do your work here
tx.Complete()
End Using
End Using
The following error is thrown : System.Data.Odbc.OdbcException: ERROR [HYC00] [Oracle][ODBC]Optional feature not implemented. Meaning that the driver does not support the version of ODBC behavior that the application requested.
but when i slightly change the code, it works fine
Also using ODBCTransaction Object works fine
So morale of the story ... somewhere System.transactions uses ODBCtransactions ?
Any info is welcome!
Regards,
Alexander
So the following piece of code gives an error
Using tx As New TransactionScope
Using con As New Odbc.OdbcConnection
con.ConnectionString = "Driver={Oracle RDB Driver};server= ......"
con.Open()
' do your work here
tx.Complete()
End Using
End Using
The following error is thrown : System.Data.Odbc.OdbcException: ERROR [HYC00] [Oracle][ODBC]Optional feature not implemented. Meaning that the driver does not support the version of ODBC behavior that the application requested.
but when i slightly change the code, it works fine
Using con As New Odbc.OdbcConnection
con.ConnectionString = "Driver={Oracle RDB Driver};server= ......"
con.Open()
Using tx As New TransactionScope
' do your work here
tx.Complete()
End Using
End Using
Also using ODBCTransaction Object works fine
Dim tx As Odbc.OdbcTransaction = Nothing
Dim con As System.Data.Odbc.OdbcConnection = Nothing
Try
con = New System.Data.Odbc.OdbcConnection
con.ConnectionString = "Driver={Oracle RDB Driver};server= ......"
con.Open()
tx = con.BeginTransaction
'do your work here
tx.Commit()
Catch ex As Exception
If tx IsNot Nothing Then tx.Rollback()
Throw
Finally
If tx IsNot Nothing Then tx.Dispose()
If con IsNot Nothing Then con.Dispose()
End Try
So morale of the story ... somewhere System.transactions uses ODBCtransactions ?
Any info is welcome!
Regards,
Alexander
4 comments:
Application Development Chronicles
This is a time to talk about writers block. This is a really widespread topic https://eduessayhelper.org/blog/writers-block and we should make an open discussion!
What a great post to read! Let me tell you how to cite in mla now. You will need that.
It is time for you to join them. So, you were interested in the question, how to find a bride. This means that it is time to go colombian brides online and start analyzing dating sites. This is especially important for people who are not very good with computers. The path to happiness should be pleasant and convenient.
Post a Comment