How to execute SP from access in C# RRS feed

  • Question

  • User-891108925 posted

    I am searching to write an store procedure in .cs file (C#) and then execute it in access data base (.mdb). Is there any way? But wants to execute multiple Queries in single store procedure. Is it Possible? Thanks in Advance Pankaj Deharia

    Saturday, March 7, 2009 3:52 AM


  • User-1199946673 posted

    You want to wirte stored procedures in a .cs file? Stored Procedures ar entities that reside in a database, not in a program files. Access does not have Stored Procedures, but something that looks like them. they are calles Savede Queries. The may difference of an Access Saved Query to A Stored Procedure in  for example SQL Server is that it can only contain 1 SQL statement. If you want to execute multiple related Saved Queries (or other queries) you should wrap them in a transaction

    Since you want to store them in a .cs file, you may want to consider using parameterized queries:


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, March 7, 2009 8:39 AM