Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Posts
    73

    Unanswered: Passing Variables (to SProcs)

    Does anyone know how to pass avriables to a Store Procedure when using an Access Project.

    So if I have a command DoCmd.OpenStored Procedure and the store procedure has three variables defined how do I pass them to it?

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I never knew that method exists!
    I beleive what you have to do is run the command as a command through your connection/recordset object.
    Code:
    Dim command As String
    
    command = "EXEC sprocName @param1 = 'textValue', @param2 = 1234
    George
    Home | Blog

  3. #3
    Join Date
    Apr 2004
    Posts
    73
    thank you for writing back so quickly

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    No problem!

    Let us know how you get on please
    George
    Home | Blog

Posting Permissions

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