Using ADO.Net to insert procedures into MS Access

V

Van T. Dinh

I think ADO.Net creates the wrong date/time on your computer.

Please check your computer date/time.
 
J

Josh

Hi Guys,

I am using C#.NET to insert stored procedurs into an Access Database but for
some reason the @ symbols are being deleted for example.
The Stored procedure i am trying to insert is:

CREATE PROCEDURE sp_displaySite
(
@param int
)
AS
SELECT *
FROM tbl_sites
WHERE siteID = @param;

But in the Access Datatbase the stored procedure reads:
PARAMETERS param Long;
SELECT *
FROM tbl_sites
WHERE (((tbl_sites.siteID)=[@param]));

How do i make the param be @param in the PARAMETERS line?

Thanks for the help,
Josh
 
M

MacDermott

Access (Jet) uses ANSI-SQL, not the T-SQL which is used by SQL Server.
The syntax you report is correct for ANSI-SQL, and should run correctly in
Access, returning the same values as the original T-SQL .

HTH
- Turtle
 
Top