klipkop
Posts: 16
|
Posted: 07/09/2007, 2:37 PM |
|
There are a lot of posts around executing your own stored procedure which are very confusing. After hours of trying different combinations here is my code - that works - for .net
The code is for C# using DAO as connection type
Code to change is in UPPERCASE
// Use existing data connection
DataAccessObject NewDao = Settings.YOURCONNECTIONNAMEDataAccessObject;
// declare and set your variables that the SP needs - this gets it from the URL
int @PARAMETER1 = Int32.Parse(Request.QueryString["VARIABLE1"]);
int @PARAMETER2= Int32.Parse(Request.QueryString["VARIABLE2"]);
// Execute the SP the EXEC I think must be in Uppercase?
string sSql = "EXEC STOREDPROCEDURENAME " + @PARAMETER1+","+@PARAMETER2;
NewDao.ExecuteReader(sSql);
Thats it - and it works
|
|
|
|