Thread: Using PostgreSQL transactions through MS Access?

Using PostgreSQL transactions through MS Access?

From
Neal Lindsay
Date:
I am trying to update my database with a big transaction so I don't get
an invalid state.  My front end is in Access 97.  Is there anyone out
there who does this that could tell me what I'm doing wrong?  Here's my
code:

queryString = "BEGIN TRANSACTION;"
mdb.Execute queryString, dbSQLPassThrough

It tells me that it's an "Invalid SQL Statement".  It seems like Access
is trying to parse it instead of sending it on to the DB server.  I
thought that the dbSQLPassThrough was supposed to stop that.  Does
anyone know where I went wrong?


Re: Using PostgreSQL transactions through MS Access?

From
wsheldah@lexmark.com
Date:

Drop the semicolon at the end of the string.  In this context, it's not needed
to tell where the end of the statement is.

You might want to use a parameterized stored procedure that does multiple
updates inside a transaction.  You would invoke the stored procedure via
mdb.Execute, as per your example.


--Wes




Neal Lindsay <neal.lindsay%peaofohio.com@interlock.lexmark.com> on 07/15/2001
06:31:24 PM

To:   pgsql-general%postgresql.org@interlock.lexmark.com
cc:    (bcc: Wesley Sheldahl/Lex/Lexmark)
Subject:  [GENERAL] Using PostgreSQL transactions through MS Access?


I am trying to update my database with a big transaction so I don't get
an invalid state.  My front end is in Access 97.  Is there anyone out
there who does this that could tell me what I'm doing wrong?  Here's my
code:

queryString = "BEGIN TRANSACTION;"
mdb.Execute queryString, dbSQLPassThrough

It tells me that it's an "Invalid SQL Statement".  It seems like Access
is trying to parse it instead of sending it on to the DB server.  I
thought that the dbSQLPassThrough was supposed to stop that.  Does
anyone know where I went wrong?


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html