dbTalk Databases Forums  

access2007 create table error - invalid argument

comp.databases.ms-access comp.databases.ms-access


Discuss access2007 create table error - invalid argument in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Roger
 
Posts: n/a

Default access2007 create table error - invalid argument - 12-13-2010 , 09:13 AM






I've got a 2nd MDB with a table (tblPersonalInfo) and I'm trying to
create a linked table
strsql is the path to that mdb

this works
Set db = CurrentDb
Set tbl = db.CreateTableDef("tblPersonalInfo." & lngEmpCode, _
dbHiddenObject, _
"tblPersonalInfo", _
strSql)

but if I use, dbAttachedODBC, I get an error, invalid argument

yet if I use the link table manager to link to the table and I display
its attribute property it is set to the value of dbAttachedODBC, and
the sourceName and connect value match what I'm using above

what am I missing ?

Reply With Quote
  #2  
Old   
Roger
 
Posts: n/a

Default Re: access2007 create table error - invalid argument - 12-13-2010 , 11:10 AM






On Dec 13, 8:13*am, Roger <lesperan... (AT) natpro (DOT) com> wrote:
Quote:
I've got a 2nd MDB with a table (tblPersonalInfo) and I'm trying to
create a linked table
strsql is the path to that mdb

this works
* * * * Set db = CurrentDb
* * * * Set tbl = db.CreateTableDef("tblPersonalInfo." & lngEmpCode, _
* * * * * * * * * * * * * * * * * * dbHiddenObject, _
* * * * * * * * * * * * * * * * * * "tblPersonalInfo", _
* * * * * * * * * * * * * * * * * * strSql)

but if I use, dbAttachedODBC, I get an error, invalid argument

yet if I use the link table manager to link to the table and I display
its attribute property it is set to the value of dbAttachedODBC, and
the sourceName and connect value match what I'm using above

what am I missing ?
it looks like 'dbAttachedODBC' is readonly
using dbAttachSavePWD sets up the linked table properly

Reply With Quote
  #3  
Old   
a a r o n . k e m p f @gmail.com [MCITP: DBA]
 
Posts: n/a

Default Re: access2007 create table error - invalid argument - 01-03-2011 , 06:02 AM



I just use CREATE TABLE syntax, because I think that's a lot easier to deal with.

Aren't you tired of dealing with all this extra bullshit involved with linked tables?

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.