June 13, 2006 at 5:45 am
Hi ,
There is an already linked table, and it wont allow me to add columns in the normal 'insert column' way.
Need help!!
June 13, 2006 at 7:04 am
I'm going to assume that you are using an MDB file, with a SQL Server linked table. I've seen this behavior before, but it could be caused by any number of issues.
If this is something you need to do on a regular basis, you should look into your connection and security settings. That's likely where the issue lies.
If this is a one-time (or infrequent) issue, I would recommend going into Enterprise Manager to insert the column. Or, issuing the DDL SQL directly. Nine times out of ten, that's just going to be a lot easier.
June 13, 2006 at 8:11 am
I am using an MDB file, with a Microsoft Access 2000 linked table......
June 13, 2006 at 9:49 am
You can't add columns to a linked table through the MDB interface.
You can issue DDL SQL using the ADODB.CONNECTION object.
Dim myconn As New ADODB.Connection
With myconn
.ConnectionString = "DRIVER=SQL Server;SERVER=HOUSQL1;DATABASE=EPRD_Training;Trusted_Connection=Yes"
.Open
.Execute "ALTER TABLE MyTable ADD [MyNewColumn] [varchar](25) NULL"
.Close
End With
Set myconn = Nothing
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply