Ebi
February 27th, 2000, 09:36 AM
Hi! I'm converting a Access 2.0 Database to an Access 97 Database and found a problem with the CreateQueryDef-Method. In Access 2.0 it was possible to run this method of an TableDef-Object with the dbAttachedTable Argument, what is important for proper running of the rest of the database. In Access 97 there is an error message when running that method with this argument. If I do not use this argument there is an error message on the next line of code (the append method). So my question: How can I create a tabledef object as an attached table?
private Function mbDbConnectTbl(ws as Workspace, sTbl as string, sDatabase as string, sManPath as string) as Integer
Dim db as Database
Dim td as TableDef
Dim sConnect as string
sConnect = sDatabase
sConnect = ";DATABASE=" & sConnect
set db = ws.Databases(0)
set td = db.CreateTableDef(sTbl, dbAttachedTable, sTbl, sConnect)
db.TableDefs.Append td
Thank you for your help,
Ebi
private Function mbDbConnectTbl(ws as Workspace, sTbl as string, sDatabase as string, sManPath as string) as Integer
Dim db as Database
Dim td as TableDef
Dim sConnect as string
sConnect = sDatabase
sConnect = ";DATABASE=" & sConnect
set db = ws.Databases(0)
set td = db.CreateTableDef(sTbl, dbAttachedTable, sTbl, sConnect)
db.TableDefs.Append td
Thank you for your help,
Ebi