hi
I want to add a culomn to SQL server by writing code in vb.
how can I Do that?
best regards,
Sam
Printable View
hi
I want to add a culomn to SQL server by writing code in vb.
how can I Do that?
best regards,
Sam
First you need to connect to the database - use ADO.
Then:
cn.Execute "ALTER myTable ADD myField varchar(100)"
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
true. However if speed is your thing, I believe ALTER TABLE will be quicker :)
thanks to both of you.
I use the SQL is it right with SQL too?
I mean that sentence which gaff mentioned.
regards,
Sam