[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-general
Subject: Re: [GENERAL] pgoledb transaction error
From: gato pardo <gato.pardo () gmail ! com>
Date: 2011-12-31 14:20:55
Message-ID: 1325341255690-5112200.post () n5 ! nabble ! com
[Download RAW message or body]
Thanks David
Complying with your requirements:
"Tip 1: Provide the SQL statements you are trying to execute when you get
the
error; given that is it a "commit"-type error the entire transaction is
useful."
I copy some of the code used:
MyConnectionString = "Provider=PostgreSQL OLE DB Provider;Data
Source=172.21.0.85;user id=postgres;password=;location=db_13N_QJM;"
MyO_DbConnection = New System.Data.OleDb.OleDbConnection(MyConnectionString)
MyO_DbConnection.Open()
MyO_DbCommand = New System.Data.OleDb.OleDbCommand
MyO_DbCommand.Connection = MyO_DbConnection
MySQL = " UPDATE reg1001b set tipo_1001b = 'P', descr_1001b = 'PASIVO',
statu_1001b = 'A', modifi_por_1001b = 'ADMINISTRATO', fecha_mod_1001b =
'12/31/2011 09:16:20' WHERE compania_1001b = 'QJM' and tipo_1001b = 'P'"
String
Try
MyO_DbCommand.CommandText = MySQL
MyO_DbTrans = MyO_DbConnection.BeginTransaction
MyO_DbCommand.Transaction = MyO_DbTrans
MyRes_01 = MyO_DbCommand.ExecuteNonQuery()
MyO_DbTrans.Commit()
Catch e As Exception
MyO_DbTrans.Rollback()
MyMsg = "Error # " & Str(Err.Number) & " Esta Generado Por : " _
& Err.Source & ControlChars.CrLf & ControlChars.CrLf
& Err.Description
MsgBox(MyMsg, MsgBoxStyle.Information, "Error")
End Try
"Tip 2: Make use of the PostgreSQL server logs to see exactly what the
server
is (has been) attempting to execute instead of the single error message the
client is seeing."
LOG: could not receive data from client: Connection reset by peer
LOG: unexpected EOF on client connection
LOG: could not receive data from client: Connection reset by peer
LOG: unexpected EOF on client connection
LOG: could not receive data from client: Connection reset by peer
LOG: unexpected EOF on client connection
As the log shows we tried thrice to execute the above code.
I should add that the same code, and much more, is executed whout failure
when using odbc connection.
Any advice ?
Felipe
--
View this message in context: \
http://postgresql.1045698.n5.nabble.com/commit-transaction-failed-tp1883952p5112200.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic