Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Database and Reporting > Adding a Field


Reply
 
Thread Tools Display Modes
  #1  
Old 07-24-2003, 11:04 AM
rust710 rust710 is offline
Contributor
 
Join Date: Oct 2002
Location: Michigan, USA
Posts: 516
Default Adding a Field


I am trying to add a field to a DB, with SQL. Is this possible? Where should I look?
Reply With Quote
  #2  
Old 07-24-2003, 11:09 AM
PWNettle PWNettle is offline
Verbose Coder

Retired Moderator
* Guru *
 
Join Date: Dec 1999
Location: Phoenix, Arizona
Posts: 3,011
Default

You should be able to do it with ADOX.

You can also do it with ADO using the Execute method off the connection object with the proper SQL DDL statement. In this case, that would be the ALTER TABLE (ADD COLUMN) statement.

You should be able to find info on ALTER TABLE in MSDN or SQL Books Online and find info on ADOX in MSDN.

This topic has also been covered several times here so if you search you can probably find several examples.

Cheers,
Paul
Reply With Quote
  #3  
Old 07-24-2003, 11:42 AM
rust710 rust710 is offline
Contributor
 
Join Date: Oct 2002
Location: Michigan, USA
Posts: 516
Default

Thankyou very much. It is much easier to find what you are looking for when you know what you are looking for.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
adding to a field using UPDATE ValiantKhan Database and Reporting 1 02-20-2003 06:41 PM
adding field value to outlook subject line JimCarney6 Word, PowerPoint, Outlook, and Other Office Products 2 11-08-2002 07:16 AM
Adding field with ADOX Mike Database and Reporting 2 10-18-2001 01:21 AM
Adding a new 'field' to the database Ryo2 Database and Reporting 5 05-22-2001 12:10 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->