Try to use ADO
Dim con as ADODB.Connection
set con = new ADODB.Connection
con.Open "DRIVER={PostgreSQL};
SERVER=ipaddress; port=5432;
DATABASE=dbname;
UID=username;PWD=password;"
con.BeginTrans
con.Execute "UPDATE accounts SET balance = balance + 10
Cool. I knew ADO could do transactions on Access's JET database
engine, but didn't know they could do so on another RDBMS like
PostgreSQL. So basically I can use the BeginTrans and CommitTrans to
do the work of PostgreSQL's BEGIN; and COMMIT;
On a adjacent topic, how does PostgreSQL know that Be
Karen Hill wrote:
>>From Access I'd like to run pass the following from MS Access to
> PostgreSQL 8.1 using VBA:
>
> BEGIN;
> UPDATE accounts SET balance = balance + 100.00 WHERE acctnum = 12345;
> UPDATE accounts SET balance = balance - 100.00 WHERE acctnum = 7534;
> COMMIT;
>
> It won't let me
Bruce Momjian wrote:
> Karen Hill wrote:
> > >From Access I'd like to run pass the following from MS Access to
> > PostgreSQL 8.1 using VBA:
> >
> > BEGIN;
> > UPDATE accounts SET balance = balance + 100.00 WHERE acctnum = 12345;
> > UPDATE accounts SET balance = balance - 100.00 WHERE acctnum = 7
Karen Hill wrote:
> >From Access I'd like to run pass the following from MS Access to
> PostgreSQL 8.1 using VBA:
>
> BEGIN;
> UPDATE accounts SET balance = balance + 100.00 WHERE acctnum = 12345;
> UPDATE accounts SET balance = balance - 100.00 WHERE acctnum = 7534;
> COMMIT;
>
> It won't let me
>From Access I'd like to run pass the following from MS Access to
PostgreSQL 8.1 using VBA:
BEGIN;
UPDATE accounts SET balance = balance + 100.00 WHERE acctnum = 12345;
UPDATE accounts SET balance = balance - 100.00 WHERE acctnum = 7534;
COMMIT;
It won't let me. Any ideas solutions?
--