Thread: Access 2000 ODBC table links
Private Sub Link_ODBCTbl(rstrTblSrc As String, rstrTblDest As String, dbsCurrent As Database) Dim tdf As TableDef On Error Resume Next Set tdf = dbsCurrent.CreateTableDef(rstrTblDest) dbsCurrent.TableDefs.Delete rstrTblDest tdf.Connect = "ODBC;DRIVER={PostgreSQL};" _ & "DATABASE=soldb;SERVER=10.73.233.137;" _ & "PORT=5432;" _ & "UID=soluser;" _ & "PWD=soluser;READONLY=0;PROTOCOL=6.4;" _ & "FAKEOIDINDEX=1;SHOWOIDCOLUMN=1;" _ & "ROWVERSIONING=1;SHOWSYSTEMTABLES=0;" _ & "CONNSETTINGS=" tdf.SourceTableName = rstrTblSrc dbsCurrent.TableDefs.Append tdf dbsCurrent.TableDefs.Refresh End Sub Windows2000: Postgre7.1.3+Access2000 "dbsCurrent.TableDefs.Append tdf" executing、why Access2000 Program closed?Momory Error?
What version of psqlodbc driver are you using ? regards, Hiroshi Inoue Ni Kun wrote: > > Private Sub Link_ODBCTbl(rstrTblSrc As String, rstrTblDest As String, > dbsCurrent As Database) > > Dim tdf As TableDef > > On Error Resume Next > > Set tdf = dbsCurrent.CreateTableDef(rstrTblDest) > dbsCurrent.TableDefs.Delete rstrTblDest > > tdf.Connect = "ODBC;DRIVER={PostgreSQL};" _ > & "DATABASE=soldb;SERVER=10.73.233.137;" _ > & "PORT=5432;" _ > & "UID=soluser;" _ > & "PWD=soluser;READONLY=0;PROTOCOL=6.4;" _ > & "FAKEOIDINDEX=1;SHOWOIDCOLUMN=1;" _ > & "ROWVERSIONING=1;SHOWSYSTEMTABLES=0;" _ > & "CONNSETTINGS=" > tdf.SourceTableName = rstrTblSrc > > dbsCurrent.TableDefs.Append tdf > dbsCurrent.TableDefs.Refresh > > End Sub > > Windows2000: Postgre7.1.3+Access2000 > "dbsCurrent.TableDefs.Append tdf" executing、why Access2000 Program > closed?Momory Error? > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html