By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,611 Members | 1,661 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,611 IT Pros & Developers. It's quick & easy.

adding a column to a linked table

P: n/a
A
Hi
I use the following to add a column. This does not work on a linked table.
Error: Cannot execute data definition statements on linked data sources.
Any ideas ?
Thanks
Alfred

Dim cmd As New ADODB.Command
cmd.ActiveConnection = CurrentProject.Connection
cmd.CommandText = "ALTER TABLE QuoteDetails ADD COLUMN IdNo
AUTOINCREMENT(1,1);"
On Error Resume Next 'gives error if column already exists
cmd.Execute
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You can't update a linked table you have to update it in the source
database.
--
Terry Kreft

"A" <al**@mail.com> wrote in message news:dl**********@ctb-nnrp2.saix.net...
Hi
I use the following to add a column. This does not work on a linked table.
Error: Cannot execute data definition statements on linked data sources.
Any ideas ?
Thanks
Alfred

Dim cmd As New ADODB.Command
cmd.ActiveConnection = CurrentProject.Connection
cmd.CommandText = "ALTER TABLE QuoteDetails ADD COLUMN IdNo
AUTOINCREMENT(1,1);"
On Error Resume Next 'gives error if column already exists
cmd.Execute

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.