problems with transactions in C++Builder

From: igor <igor_kh(at)mailru(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: problems with transactions in C++Builder
Date: 2000-06-29 03:23:01
Message-ID: 1341165475.20000629072301@mailru.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greatings!

Help me please to resolve my problem.
As appeared, postgesql server doesn't rollback transaction,
when I use
C++ Builder environment. May be sombody have
an idea, how to make it work?
The test source in the bottom of the letter.

I will be very greatefull for any help.

Igor.

======================================
CD->srvdb->StartTransaction();
CD->EQuery->Close();
CD->EQuery->SQL->Clear();
sprintf (str, "begin");
CD->EQuery->SQL->Add(str);
CD->EQuery->ExecSQL();

CD->EQuery->Close();
CD->EQuery->SQL->Clear();
sprintf (str, "lock mytable");
CD->EQuery->SQL->Add(str);
CD->EQuery->ExecSQL();

sprintf (str,"update mytable set \
active=1 where st = '2020201'" );

CD->EQuery->Close();
CD->EQuery->SQL->Clear();
CD->EQuery->SQL->Add(str);
CD->EQuery->ExecSQL();

CD->EQuery->SQL->Clear();
sprintf (str, "abort");
CD->EQuery->SQL->Add(str);
CD->EQuery->ExecSQL();
CD->srvdb->Rollback();

==============================

the field "active" save new value = 1 after
'abort' command.

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2000-06-29 04:57:41 Publishing my book
Previous Message igor 2000-06-29 03:14:50 test