pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
TRANSACTIONS and TCP/IP
5+ messages / 4 participants
[nested] [flat]

* TRANSACTIONS and TCP/IP
@ 1999-12-16 00:38  Barry Baldwin <bbaldwin@indyme.com>
  0 siblings, 3 replies; 5+ messages in thread

From: Barry Baldwin @ 1999-12-16 00:38 UTC (permalink / raw)
  To: pgsql-sql

Hi,

I've got postgres 6.5.2 running on a Linux box and I'm developing a client
app in Delphi.  The client sends SQL commands via TCP/IP.  
I've tried starting a transaction by sending the BEGIN command and then I
update a table and then send a ROLLBACK command to try 
and abort the transaction.  It doesn't seem to be working.  Even though I've
done a rollback the transaction still goes through.  

When I start the transaction I get this message on the Linux box console
NOTICE:   BeginTransactionBlock and not in default state

This indicates that there is a transaction already in process.  I don't know
how that can be.

When I issue the rollback command I get this message
NOTICE:  UserAbortTransactionBlock and not in in-progress state

This indicates that there is no transaction in progress.  There sure should
be.

I tried all of the above in psql and it works fine.  Is this something that
just won't work over a TCP/IP connection?

Any suggestions on how I can get transactions to work would be greatly
appreciated,

TIA,

Barry





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [SQL] TRANSACTIONS and TCP/IP
@ 1999-12-16 03:42  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Barry Baldwin <bbaldwin@indyme.com>
  2 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 1999-12-16 03:42 UTC (permalink / raw)
  To: Barry Baldwin <bbaldwin@indyme.com>; +Cc: pgsql-sql

Barry Baldwin <bbaldwin@indyme.com> writes:
> I've got postgres 6.5.2 running on a Linux box and I'm developing a client
> app in Delphi.  The client sends SQL commands via TCP/IP.  
> I've tried starting a transaction by sending the BEGIN command and then I
> update a table and then send a ROLLBACK command to try 
> and abort the transaction.  It doesn't seem to be working.

I don't know anything about Delphi, but it sure sounds like something
in the interface software you're using is sending BEGIN and COMMIT
commands for you.  This feature is commonly called autocommit --- look
for documentation on how to turn it off.

> I tried all of the above in psql and it works fine.  Is this something that
> just won't work over a TCP/IP connection?

No, connection type hasn't got anything to do with it...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [SQL] TRANSACTIONS and TCP/IP
@ 1999-12-16 07:04  George Moga <george@cicnet.ro>
  parent: Barry Baldwin <bbaldwin@indyme.com>
  2 siblings, 0 replies; 5+ messages in thread

From: George Moga @ 1999-12-16 07:04 UTC (permalink / raw)
  To: Barry Baldwin <bbaldwin@indyme.com>; pgsql-sql

Barry Baldwin wrote:

> Hi,
>
> I've got postgres 6.5.2 running on a Linux box and I'm developing a client
> app in Delphi.  The client sends SQL commands via TCP/IP.
> I've tried starting a transaction by sending the BEGIN command and then I
> update a table and then send a ROLLBACK command to try
> and abort the transaction.  It doesn't seem to be working.  Even though I've
> done a rollback the transaction still goes through.
>
> When I start the transaction I get this message on the Linux box console
> NOTICE:   BeginTransactionBlock and not in default state
>
> This indicates that there is a transaction already in process.  I don't know
> how that can be.
>
> When I issue the rollback command I get this message
> NOTICE:  UserAbortTransactionBlock and not in in-progress state
>
> This indicates that there is no transaction in progress.  There sure should
> be.
>
> I tried all of the above in psql and it works fine.  Is this something that
> just won't work over a TCP/IP connection?
>
> Any suggestions on how I can get transactions to work would be greatly
> appreciated,
>
> TIA,
>
> Barry
>
> ************

I belive you use ODBC for conection. I never use PostgreSQL ODBC but in ACCESS
ODBC if you want to use transaction, you must use, before your transaction:

dbc set autocommit off

where dbc is your database conection. After you finishing your transaction:

dbc set autocommit on

I hope this help you!


Best regards,
    George Moga,
    george@cicnet.ro


P.S. Sorry for my english.





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [SQL] TRANSACTIONS and TCP/IP
@ 1999-12-16 09:00  Vladimir Terziev <vlady@school.digsys.bg>
  parent: Barry Baldwin <bbaldwin@indyme.com>
  2 siblings, 0 replies; 5+ messages in thread

From: Vladimir Terziev @ 1999-12-16 09:00 UTC (permalink / raw)
  To: Barry Baldwin <bbaldwin@indyme.com>; +Cc: pgsql-sql


   What kind of connection you use?

   Embeded SQL in your Delphi source ot ODBC?


	Vladmir

On Wed, 15 Dec 1999, Barry Baldwin wrote:

> Hi,
> 
> I've got postgres 6.5.2 running on a Linux box and I'm developing a client
> app in Delphi.  The client sends SQL commands via TCP/IP.  
> I've tried starting a transaction by sending the BEGIN command and then I
> update a table and then send a ROLLBACK command to try 
> and abort the transaction.  It doesn't seem to be working.  Even though I've
> done a rollback the transaction still goes through.  
> 
> When I start the transaction I get this message on the Linux box console
> NOTICE:   BeginTransactionBlock and not in default state
> 
> This indicates that there is a transaction already in process.  I don't know
> how that can be.
> 
> When I issue the rollback command I get this message
> NOTICE:  UserAbortTransactionBlock and not in in-progress state
> 
> This indicates that there is no transaction in progress.  There sure should
> be.
> 
> I tried all of the above in psql and it works fine.  Is this something that
> just won't work over a TCP/IP connection?
> 
> Any suggestions on how I can get transactions to work would be greatly
> appreciated,
> 
> TIA,
> 
> Barry
> 
> 
> 
> ************
> 
> 




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* RE: [SQL] TRANSACTIONS and TCP/IP
@ 1999-12-16 18:37  Barry Baldwin <bbaldwin@indyme.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Barry Baldwin @ 1999-12-16 18:37 UTC (permalink / raw)
  To: pgsql-sql

Hi,

I would like to thank everyone for their responses.  I was able to get it
working by using the
various suggestions I received.  I had to turn off the ODBC drivers
autocommit and then
I could use the Tdatabase types' StartTransaction, Commit and RollBack
methods.

Thanks again everybody,

Barry


Barry Baldwin wrote:

> Hi,
>
> I've got postgres 6.5.2 running on a Linux box and I'm developing a client
> app in Delphi.  The client sends SQL commands via TCP/IP.
> I've tried starting a transaction by sending the BEGIN command and then I
> update a table and then send a ROLLBACK command to try
> and abort the transaction.  It doesn't seem to be working.  Even though
I've
> done a rollback the transaction still goes through.
>
> When I start the transaction I get this message on the Linux box console
> NOTICE:   BeginTransactionBlock and not in default state
>
> This indicates that there is a transaction already in process.  I don't
know
> how that can be.
>
> When I issue the rollback command I get this message
> NOTICE:  UserAbortTransactionBlock and not in in-progress state
>
> This indicates that there is no transaction in progress.  There sure
should
> be.
>
> I tried all of the above in psql and it works fine.  Is this something
that
> just won't work over a TCP/IP connection?
>
> Any suggestions on how I can get transactions to work would be greatly
> appreciated,
>
> TIA,
>
> Barry
>
> ************





^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~1999-12-16 18:37 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-12-16 00:38 TRANSACTIONS and TCP/IP Barry Baldwin <bbaldwin@indyme.com>
1999-12-16 03:42 ` Tom Lane <tgl@sss.pgh.pa.us>
1999-12-16 07:04 ` George Moga <george@cicnet.ro>
1999-12-16 09:00 ` Vladimir Terziev <vlady@school.digsys.bg>
1999-12-16 18:37 RE: [SQL] TRANSACTIONS and TCP/IP Barry Baldwin <bbaldwin@indyme.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox