Passing parameters to SQL Store Procedure from Access from

  • Converted access 2007 DB to SQL server 2008 using SSMA.

    The access forms needs to be retained as front end and SQL Server as back end.

    Was able to create some static pass through queries, and was able to get data through ODBC link to SQL.

    One of the access forms has a drop down listing regions(approx 10 regions), and a start and end data fields.

    Prior to conversion, There are about 10 queries written, one for each region. A macro is called,

    which picks up the appropriate query based on the selected drop down region.

    The query has where conditions, against the date field values captured on the form.

    As part of conversion, moved the query to a store procedure and converted to SQL syntax. Was able to test this code, as pass through query, by hard coding values.

    How can i pass the form date values and drop down values, as parameters to the store procedure.

    looking for help on this.

  • It is relative simple to pass parameters or a collection of to a Stored Procedure.

    Basally assign the values of the form controls and Execute the SP with the parameters.

    I have written several a while back but I had to leave them behind.

    Try this article and if that does not hope Goggle or ask questions.

    http://www.access-programmers.co.uk/forums/showthread.php?t=209332

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply