From: | "Karen Hill" <karen_hill22(at)yahoo(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Transactions, PostgreSQL and MS Access front end. |
Date: | 2006-04-24 03:24:13 |
Message-ID: | 1145849053.849601.272230@g10g2000cwb.googlegroups.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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 = 7534;
> > COMMIT;
> >
> > It won't let me. Any ideas solutions?
>
> What error does it show?
>
Error on character 7.
I suspect it only allows one SQL statement to go through and thinks
everything after the BEGIN; is an error. I thought of creating a
function in pl/pgsql that would allow me to do this. Something like
this in postgresql: NOTE:pseudocode
function(sql_statement_1, sql_statement_2){
BEGIN;
sql_statement_1;
sql_statement_2;
COMMIT;
}
And then I'd run that function from access: NOTE:pseudocode
DoCmd.RunSQL "function('UPDATE accounts..WHERE acctnum = 12345',
'UPDATE accounts...WHERE acctnum = 7534')"
From | Date | Subject | |
---|---|---|---|
Next Message | karthick muthu | 2006-04-24 07:12:43 | to know |
Previous Message | Bruce Momjian | 2006-04-24 02:32:17 | Re: Transactions, PostgreSQL and MS Access front end. |