Results 1 to 6 of 6

Thread: Create Procedure in Vb code

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    5

    Post

    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

  2. #2
    Hyperactive Member Gimpster's Avatar
    Join Date
    Oct 1999
    Location
    Redmond, WA 98052
    Posts
    331

    Post

    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.
    -Ryan
    I smell varmint poontang, and the only good varmint poontang is dead varmint poontang...

    -Bill Murray, Caddyshack

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    5

    Post

    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

  4. #4
    Hyperactive Member Gimpster's Avatar
    Join Date
    Oct 1999
    Location
    Redmond, WA 98052
    Posts
    331

    Post

    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.
    -Ryan
    I smell varmint poontang, and the only good varmint poontang is dead varmint poontang...

    -Bill Murray, Caddyshack

  5. #5

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    5

    Post

    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

  6. #6
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    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)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width