|
-
Oct 31st, 2002, 03:39 PM
#1
Thread Starter
New Member
creating column by code
hi
I want to add a culomn to SQL server by writing code in vb.
how can I Do that?
best regards,
Sam
-
Oct 31st, 2002, 05:39 PM
#2
Fanatic Member
First you need to connect to the database - use ADO.
Then:
cn.Execute "ALTER myTable ADD myField varchar(100)"
-
Nov 3rd, 2002, 06:48 AM
#3
Since you are using SQL Server, there are two more options available apart from the one that Gaffer mentioned.
The options are using ADOX and SQL-DMO. Read up on both and choose the one that suits you better. In my opinion SQL-DMO score way above ADOX.
Cheers!
Abhijit
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
Nov 4th, 2002, 11:00 AM
#4
Fanatic Member
true. However if speed is your thing, I believe ALTER TABLE will be quicker
-
Nov 4th, 2002, 11:25 AM
#5
Thread Starter
New Member
thanks to both of you.
I use the SQL is it right with SQL too?
I mean that sentence which gaff mentioned.
regards,
Sam
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
|