TroyMcClure
Technical User
I'm trying to auotmate linking of odbc tables to an access database. I'm getting the error 3001 'Invalid Argument'.
Below is the line:
'tblCus' is a valid table in the sql server database. CustDB is a valid odbc dsn connection, the uid and pwd are valid, I can select that dsn and link with no problem. I'm gussing the dbAttachODBC is the problem, but there are no others that seem right for this type of link.
Is it even possible to automate linking odbc tables?? Thanks,
-james
Below is the line:
Code:
dim db as database, td as tabledef
set db = currentdb
set tb = db.CreateTableDef("tblCus", dbAttachedODBC, "tblCus", "ODBC;DSN=CustDB;UID=KANG;PWD=KANG")
'tblCus' is a valid table in the sql server database. CustDB is a valid odbc dsn connection, the uid and pwd are valid, I can select that dsn and link with no problem. I'm gussing the dbAttachODBC is the problem, but there are no others that seem right for this type of link.
Is it even possible to automate linking odbc tables?? Thanks,
-james