VB Database question [Archive] - SpeedGuide.net Broadband Community

View Full Version : VB Database question


Kyle
06-04-03, 01:45 AM
I have a program built so that when a certain file is selected it will retrieve any attached information from a database i have created and display it, and i can edit the attatched information but i want a way to add a new record(or column would be even better) to a table. How can i set a command to "Addnewrecord with name whatever on click"??? I have been digging through the built in libraries and cannot find a function for adding a record or especially a column. Any help would be hugely appreciated!

Thanks,
Kyler1

cyberskye
06-04-03, 01:02 PM
I don't knwo VB, but...don't you need to do that through the DB server?

Pass it straight SQL...?

To add a record

USE your_db

INSERT INTO <your_table> (<column01_name>, <column02_name>) VALUES
(<value01>, <value02>)


To add a column
USE you_db
ALTER TABLE <your_table>
ADD <new_column_name> <data type> after <some other column>


Skye

[sAs]
06-30-03, 09:25 PM
The Wizard Will Even Do It For U.

New Form/Form Wizard

Or A SQL Statement Will Do :)