B
Bob Bonta
I have a SQL backend database which is accessed through an Access front-end
with tables linked with a DSN-less connection.
I need to modify one of the linked tables via code (I don't have direct
access to the SQL database via Enterprise Mgr, etc). With an Access BE
database, I would enter the following:
Set db = OpenDatabase("Path & Filename")
Set tdf = db.TableDefs(strTableName)
tdf.Fields.Append tdf.CreateField(strNewFieldName, dbText,
intFieldSize)
However, since I can't modify a linked table to a SQL database with the
above method, I am looking for a similiar snippet which will allow me to
directly modify the SQL table, then I could refresh the link to update the
view to the table.
I'm speculating that I can directly access the SQL table utilizing the same
connection string definition as when I link the table to modify the table on
SQL.
Is this possible? What would be the syntax for that operation?
with tables linked with a DSN-less connection.
I need to modify one of the linked tables via code (I don't have direct
access to the SQL database via Enterprise Mgr, etc). With an Access BE
database, I would enter the following:
Set db = OpenDatabase("Path & Filename")
Set tdf = db.TableDefs(strTableName)
tdf.Fields.Append tdf.CreateField(strNewFieldName, dbText,
intFieldSize)
However, since I can't modify a linked table to a SQL database with the
above method, I am looking for a similiar snippet which will allow me to
directly modify the SQL table, then I could refresh the link to update the
view to the table.
I'm speculating that I can directly access the SQL table utilizing the same
connection string definition as when I link the table to modify the table on
SQL.
Is this possible? What would be the syntax for that operation?