Solved

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now