Solved

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

Posted on 2004-10-20
5
160 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

717 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