pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Moray McConnachie <Moray.McConnachie@computing-services.oxford.ac.uk>
To: pgsql-interfaces@postgresql.org
Subject: ODBC and Access 2000: linked tables problem
Date: Tue, 29 Jun 1999 11:43:30 +0100
Message-ID: <EXECMAIL.990629114330.D@moraypc.computing-services.oxford.ac.uk> (raw)

I was hoping someone could help me out with this, although 
it's probably more of an Access problem than a Postgres 
ODBC one...

I am using Access 2000 and postgres, with the postgres ODBC
drivers.

Everything worked fine under Access 97.

Importing tables from the ODBC connection is fine.
*Linking* is fine as far as the table selection and the importing of
fields and selecting of unique index goes.

However, when I try and open the linked table, it says "Access cannot
open the table in datasheet view". Nor can it access it via a query. I
have also tried hardcoding the table in a way which worked in Access 97
(code appended below), and it fails in exactly the same way.

SQL tracing appears to reveal that when a table is opened, 
Access doesn't even get as far as putting a command to the 
remote database.

This applies to new entirely blank databases. I have uninstalled and
reinstalled Office 2000. I have tried the same thing with the Openlink
ODBC drivers, which also used to work under 97, and now display the same
problem. Nothing has changed on the postgres database. I 
have tried it on a different machine, and again it works 
under Access 97, but not under 2000. I have looked on 
technet/on-line support and posted to 
comp.databases.ms-access.

It's driving me bonkers, particularly since there is 
obviously nothing wrong with the basic link, as it will 
import and link tables, just not open them!

Thanks,
Moray McConnachie

Here's the code I used to link the table...

Public Function CreateTable(Tablename As String) As Boolean

Dim remotetable As String, maintdb As Database, connectstring As String,
tdf As TableDef

remotetable = Tablename
    
    
On Error GoTo error
Set maintdb = CurrentDb

 connectstring =
"ODBC;DSN=PSQLmaint;DATABASE=maint;SERVER=somewhere.me.here.now;PORT=5432;READONLY=0;PROTOCOL=6.4;FAKEOIDINDEX=0;SHOWOIDCOLUMN=0;ROWVERSIONING=0;SHOWSYSTEMTABLES=0;CONNSETTINGS="


Set tdf = maintdb.CreateTableDef(Tablename, dbAttachSavePWD,
remotetable, connectstring)
maintdb.TableDefs.Append tdf
maintdb.TableDefs.Refresh
CreateTable = True
Exit Function

error:
On Error GoTo 0
CreateTable = False
End Function

----------------------
Moray.McConnachie@computing-services.oxford.ac.uk




view thread (4+ messages)  latest in thread

Message-ID: <EXECMAIL.990629114330.D@moraypc.computing-services.oxford.ac.uk>
Permalink:  ../EXECMAIL.990629114330.D@moraypc.computing-services.oxford.ac.uk/
Also on:    postgresql.org/message-id/EXECMAIL.990629114330.D@moraypc.computing-services.oxford.ac.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: Moray.McConnachie@computing-services.oxford.ac.uk
  Subject: Re: ODBC and Access 2000: linked tables problem
  In-Reply-To: <EXECMAIL.990629114330.D@moraypc.computing-services.oxford.ac.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox