ODBC connection string
От | Biswajit Bardalai |
---|---|
Тема | ODBC connection string |
Дата | |
Msg-id | eafd84b80608081419q32a36cd2s6e1d2ad112689959@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: ODBC connection string
|
Список | pgsql-odbc |
Hi,
I'm using the following connection string to programatically link PostgreSQL tables to MS Access.
strConn="ODBC;DRIVER={PostgreSQL};DATABASE=myDb;SERVER= 192.168.0.91 ;" & _
"PORT=5432;UID=myDbUser;PWD=pass;A0=0;A1=7.4;A2=1;A3=0;A4=1;A5=0;A6=;A7=100;A8=4096;A9=0;" & _
"B0=254;B1=8190;B2=0;B3=0;B4=1;B5=1;B6=0;B7=1;B8=0;B9=1;C0=0;C1=0;C2=dd_"
Dim tdf As TableDef
Set tdf = db.CreateTableDef(clients, dbAttachSavePWD, public.clients, strConn)
db.TableDefs.Append tdf
db.TableDefs.Refresh
I can create the linked tables and insert rows into them. The problem is tables without primary keys cannot be updated, though an insert is okay.
However, tables linked through a system DSN, have no updation problem. Is there an error in the connection string? Where can one find the complete list of parameters?
I don't want to create a DSN as I intend to distribute the Access file and don't want savvy users to be able to access the tables through the DSN. I'm not keen on creating a primary key for every table, either.
Is there a solution to this problem? Been looking for a one for several days.
FYI, the PostgreSQL ODBC driver version is: 8.02.00.02
Thanks,
Biswajit
--
Call Toronto free: http://www.vbuzzer.com/index.php?aid=biswajit
Free SMS: http://www.atrochatro.com/ptnr.php?ptnr=12259
I'm using the following connection string to programatically link PostgreSQL tables to MS Access.
strConn="ODBC;DRIVER={PostgreSQL};DATABASE=myDb;SERVER= 192.168.0.91 ;" & _
"PORT=5432;UID=myDbUser;PWD=pass;A0=0;A1=7.4;A2=1;A3=0;A4=1;A5=0;A6=;A7=100;A8=4096;A9=0;" & _
"B0=254;B1=8190;B2=0;B3=0;B4=1;B5=1;B6=0;B7=1;B8=0;B9=1;C0=0;C1=0;C2=dd_"
Dim tdf As TableDef
Set tdf = db.CreateTableDef(clients, dbAttachSavePWD, public.clients, strConn)
db.TableDefs.Append tdf
db.TableDefs.Refresh
I can create the linked tables and insert rows into them. The problem is tables without primary keys cannot be updated, though an insert is okay.
However, tables linked through a system DSN, have no updation problem. Is there an error in the connection string? Where can one find the complete list of parameters?
I don't want to create a DSN as I intend to distribute the Access file and don't want savvy users to be able to access the tables through the DSN. I'm not keen on creating a primary key for every table, either.
Is there a solution to this problem? Been looking for a one for several days.
FYI, the PostgreSQL ODBC driver version is: 8.02.00.02
Thanks,
Biswajit
--
Call Toronto free: http://www.vbuzzer.com/index.php?aid=biswajit
Free SMS: http://www.atrochatro.com/ptnr.php?ptnr=12259
В списке pgsql-odbc по дате отправления: