Solved

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

Posted on 2004-10-20
5
159 Views
Last Modified: 2010-05-02
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
Comment
Question by:Mikal613
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 29

Accepted Solution

by:
leonstryker earned 500 total points
ID: 12360854
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
 
LVL 48

Author Comment

by:Mikal613
ID: 12360898
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
 
LVL 29

Expert Comment

by:leonstryker
ID: 12360942
Look at SQL Server Books Online, it should have what you need.

Leon
0
 
LVL 2

Expert Comment

by:YSkelling
ID: 12366150
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question