Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Determining if a Column (or Field) Exists
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 24 December 2008 :  21:20:16  Show Profile
I need to check for the existence of a field in an Access DB and automatically add it if it does not exist (without crashing with an error message). I've searched here (found nothing) and on Google (found about 500 or so different methods, none of which worked).

<

AnonJr
Moderator

United States
5768 Posts

Posted - 25 December 2008 :  00:51:23  Show Profile  Visit AnonJr's Homepage
There are some methods that use ADOX, but I've noticed that it seems to work best with Access only. Most will transfer to MS SQL Server, but I digress.<
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 25 December 2008 :  01:50:05  Show Profile
Most dbms support the special INFORMATION_SCHEMA built-in views. Usually columns are in the INFORMATION_SCHEMA.COLUMNS view.
<

======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 25 December 2008 :  03:43:05  Show Profile  Visit HuwR's Homepage
you could allways just do a SELECT COLUMN FROM TABLE and place it in a try catch block, if it errors then create the column, if it doesn't error then the column exists<
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07