Skip site navigation (1) Skip section navigation (2)

Best method of access to PostgreSql using VBA in Microsoft Access

From: "David Pinelo" <adpinelo(at)yahoo(dot)es>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: Best method of access to PostgreSql using VBA in Microsoft Access
Date: 2002-01-29 21:41:13
Message-ID: 002001c1a90d$b026db10$0609d8d9@ender (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces

    I'm using Access like front-end to a PostgreSQL server with ODBC... I
make a lot of select queries with visual basic code along the aplication.
What are the best access method to obtain best perfomance? Yo know, shall I
use ODBCDirect? ADO? DAO, maybe?

    For example, I have to make a select like this: "SELECT * FROM table1
WHERE id=[Forms]![Form1]!id AND aaa=value_I_obtain_in_my_vb_code", what's
the better methdo of this one?

Dim queryd as Querydef
Dim rst as Recordset

set queryd=cnData.CreateQueryDef("")    'cnData is a Connection to ODBC
queryd.SQL="SELECT ..."
set rst=queryd.OpenRecordset(dbOpenSnapshot)


Dim dbs as Database
Dim rst as Recordset

set dbs=CurrentDb()
set rst=dbs.OpenRecordset("SELECT ...")

And, if I want to update a record, what's the best?

this one?



Dim queryd as QueryDef
set queryd=cnData.CreateQueryDef("")

I have all the tables that I need, linked to mdb file.

Thank you very much

Do You Yahoo!?
Get your free address at

pgsql-interfaces by date

Next:From: isaac flemminDate: 2002-01-30 00:53:07
Subject: libpq++ compiling errors...
Previous:From: Yoghini ThevarajahDate: 2002-01-29 17:23:27
Subject: Help in configuring JDBC driver

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group