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?
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 .