• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 169
  • Last Modified:

Update all fields in database Except the First Field in Database to Allow Nulls (sql server 2000)

In Code how would i achieve the following

VB6
SQL Server 2000

Alter all fields in database Except the First Field in Database to Allow Nulls.

Thanks
0
Mikal613
Asked:
Mikal613
  • 2
1 Solution
 
leonstrykerCommented:
You can use the ALTER TABLE syntax and pass it through ADO connection object.

http://www.winnetmag.com/SQLServer/Article/ArticleID/40538/SQLServer_40538.html

Leon
0
 
Mikal613Author Commented:
Thanks i was looking for a Copy and Paste.

Actually im almost there i just need to get the FieldType in a string instead of a numeric value

ex.  adInteger = 3 so i need integer instead of the number 3
0
 
leonstrykerCommented:
Look at SQL Server Books Online, it should have what you need.

Leon
0
 
YSkellingCommented:
You could also ADOX to check wich field is the first Allow Nulls field ?

I do not think that the 'allow nulls' is shown in the datatype...  In fact I am sure it is not ;-)

Yan
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now