|
-
Dec 8th, 2003, 10:08 AM
#1
Thread Starter
Fanatic Member
Access SQL Make new fields
I am now in charge of a large collection (about 50) MS Access 2000 databases with one or more uses in different parts of the country. Each database is exactly the same when shipped that is same tables and forms and a hell of a lot of data already in it.
Now as we have split the database we can send updates to the front end to all these users
" Missing DLL files on computers that don't allow you to install them..." that was / is a killer but that is not really my question just a side gripe.
My question is this: I wish to create a new function for the database that goes like this.
VB Code:
Function UpdateShape(Table, NewField, Value) as boolean
Docmd. er um er um duuur hmmmm
What I want to do is construct a string conatining SQL.
The SQL must create a new record in a field in a table and give all current fields a value.
What format would my SQL take?
-
Dec 8th, 2003, 11:13 PM
#2
ALTER TABLE tablename ADD columnname varchar(50)
After that,
UPDATE TABLE tablename SET columname = 'mendhak'
-
Dec 10th, 2003, 04:42 AM
#3
Thread Starter
Fanatic Member
Thankyou very much I'll give it a try...
-
Dec 10th, 2003, 05:02 AM
#4
Thread Starter
Fanatic Member
Thanks again for the help I'm going to have very happy clients now.
Just for other readers of this thread I found that the SQL pattern:
Code:
ALTER TABLE tablename ADD columnname varchar(50)
After that,
UPDATE tablename SET columname = 'mendhak'
worked best.
It's only very slightly different to the original which was a vast help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|