Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating Stored Procedures in VB

Status
Not open for further replies.

JeffCarlin

Programmer
Aug 16, 2001
33
0
0
US
In a VB6 app, we have a module that updates the db when necessary with new/modified fields and tables. Basically, we use ADO and it works just fine. However, we will probably have to edit or add some SPs as well. How can this be done thru VB?

Thanks
 
hi,
with proper access rights

go like this

create and open connection object then

cn.execute "create proc sp_newprocedure" _
"as select * from customers"

where cn is the connection object's name
sp_newprocedure is the stored procedure name


this is the simplest form. you can also create one with parameters.

also this can be done using recordset as well as command object


bye
miq


 
Great, thanks. Guess I treat it like any other "create" statement. Just execute the damned thing! Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top