madelca100
MIS
Using MS Access 2003 - I want to add a new field to a "linked" table and then populate the field with data.
Why am I doing this?
Another department drops a database onto my server each week. I want to add new fields to this database so developers can use them. I can't put any code in the database because it is replaced every week. And the other dept can't add the additional fields.
Normally you can't modify a linked table. I thought using the "in" keyword would allow me to create the new fields and populate them with data.
Notes:
1) the ALTER query works without the "in" keyword if the table is local. (i.e. not linked).
2) The UPDATE query, which uses the "in" keyword, works fine on the linked table.
The ALTER TABLE command tells me that I have a syntax error (3293).
the code is:
strAlterCaseSQL = "ALTER TABLE Cases IN 'p:\access\my.mdb' ADD Column [Case YYYY] varchar(50) null; "
DoCmd.RunSQL strAlterCaseSQL
The problem appears to be the "in" keyword.
I've tried it without the NULL parameter. Still doesn't work.
It works if I'm in the database and use
"ALTER TABLE Cases ADD Column [Case YYYY] varchar(50) null; "
I hope I provided enough information.
Appreciate your thoughts.
If I can't use the "IN" keyword is there another way to accomplish this?
thanks,
mike
Why am I doing this?
Another department drops a database onto my server each week. I want to add new fields to this database so developers can use them. I can't put any code in the database because it is replaced every week. And the other dept can't add the additional fields.
Normally you can't modify a linked table. I thought using the "in" keyword would allow me to create the new fields and populate them with data.
Notes:
1) the ALTER query works without the "in" keyword if the table is local. (i.e. not linked).
2) The UPDATE query, which uses the "in" keyword, works fine on the linked table.
The ALTER TABLE command tells me that I have a syntax error (3293).
the code is:
strAlterCaseSQL = "ALTER TABLE Cases IN 'p:\access\my.mdb' ADD Column [Case YYYY] varchar(50) null; "
DoCmd.RunSQL strAlterCaseSQL
The problem appears to be the "in" keyword.
I've tried it without the NULL parameter. Still doesn't work.
It works if I'm in the database and use
"ALTER TABLE Cases ADD Column [Case YYYY] varchar(50) null; "
I hope I provided enough information.
Appreciate your thoughts.
If I can't use the "IN" keyword is there another way to accomplish this?
thanks,
mike