Click to See Complete Forum and Search --> : Create Procedure in Vb code
N26
Feb 25th, 2000, 01:32 AM
How do I create a procedure in VB code to execute multiple sql statements. I'm using ODBC to connect to an Access DB.
I am able to execute sql statements but I don't know the Syntax for creating procedures.
Thanks
Gimpster
Feb 25th, 2000, 01:56 AM
What do you mean by "creating procedures"??? Are you saying that you want to know how to execute multiple SQL statements in a row? I'm just confused as to what you mean.
N26
Feb 25th, 2000, 02:05 AM
I need to create a procedure that will preform some calculations as well as execute about 40 sql statments all at once in MS-Access. Something like 'Create or Replace (procedure name)' in PL/Sql
Gimpster
Feb 25th, 2000, 02:17 AM
Well, I'm using ADO to access my database(it's Sybase SQL Server) and the way I do it is this:
Connection.Execute ("SQL Statement Here")
so you can just enter all of your SQL statements like that and have them execute that way.
But as far as how to create and perform calculations, I can't really help you until you give me some more information. Like, what calculations do you need to perform.
N26
Feb 25th, 2000, 02:33 AM
Thats how I'm doing it right now. I thought there might be an easier way. If I was using Oracle I could do it but I need to use Access.
Thanks for you help
Clunietp
Feb 27th, 2000, 12:45 AM
There are no stored procedures in MS Access.... but you can create a query in MS Access that does what you want, then in VB you can open that as a recordset (just like you would with a table or executing an SQL statement)
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.