adding a new field to sql backend with VB

G

Guest

I have a client with an access 2002 frontend linked to a sql backend. I need
to add a new field to the sql backend from access. I'm new to sql backends
and work offsite so I don't have access to their sql server. I am tring to
set up a wrkodbc.connection but am not sure of the commands to then add a new
boolean field. Thanks,

Christine
 
S

Sylvain Lafontaine

Hi, this newsgroup is about ADP project and not about MDB files with linked
tables to a SQL-Server; so perhaps this is not the best place to ask a
question about WrkODBC.Connection.

However, the easiest way to alter a table would be to create from Access a
new ADP project linked to the SQL-Server and use the design tools of ADP to
make your alterations.

You can do it from DAO or ADO by running something like the following SQL
command:

ALTER TABLE [dbo].[Table1] ADD
[aa] [int] NULL CONSTRAINT [DF_Table1_aa] DEFAULT (0),
[bb] [int] NOT NULL CONSTRAINT [DF_Table5_bb] DEFAULT (0), ...

However, I don't remember how to do this with DAO.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top