Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Posts
    150

    Unanswered: Syntax for calling sprocs

    Hi,

    I'm fairly new to using MSSQL 2000 as a back end. I will be using a few stored procedures, and i need to know how to call them from VBA in Access, in ADO of course.

    Thanks!
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

  2. #2
    Join Date
    Feb 2004
    Posts
    199
    simple sintax

    CodeProject.Connection.Execute "spname spparam1 [,spram2...]

    or use ADODB.COMMAND object
    MDB, ADP <-> MS SQL + VBA, ADO & RDO, .NET, Oracle, Java/Jsp.

  3. #3
    Join Date
    Nov 2003
    Posts
    150
    can you elaborate a little?

    If i use ADODB.Command, which command should i use?

    I also found DoCmd.OpenStoredProcedure

    any recommendations?

    thanks!
    Last edited by MrCrud; 03-04-04 at 14:34.
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

  4. #4
    Join Date
    Feb 2004
    Posts
    199
    if you just need a SP to be executed and don't need output results to your code then use simple sintax

    CodeProject.Connection.Execute "spname spparam1 [,spram2...]"
    MDB, ADP <-> MS SQL + VBA, ADO & RDO, .NET, Oracle, Java/Jsp.

  5. #5
    Join Date
    Nov 2003
    Posts
    150
    My SP needs a parameter from a control in a form and needs to output a records from a table that match the parameter...
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

Posting Permissions

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