Forums

 
ForumForumMainstream Foru...Mainstream Foru...DevelopersDevelopersAdding a Stored ProcedureAdding a Stored Procedure
Previous Previous
 
Next Next
New Post
 9/9/2009 6:17 PM
 
I have added a new Stored Procedure to our database that returns some filtered rows. Is there an appropriate existing class/file where I should write the call to this SP? As I am fairly new on this area, any sample snippet how this function can be made to return a datatable will be very much appreciated. Thank you and more power!
New Post
 9/9/2009 9:17 PM
 

As a general rule, we do not use stored procedures that return record sets.  Is there some reason why you cannot do the same thing with a SQL view?

 

New Post
 10/12/2009 7:57 AM
 
I need to be passing input parameters so I opted for SP as I am under the assumption that it's faster to move the calculation part at the db's end.

In the same light, how about Scalar functions? I just created a few db functions and I am also wondering where's the best place to reference them and if you can point me to a sample of how it should be done in Splendid.
New Post
 10/12/2009 11:07 AM
 

At this point it is just ADO.NET code.  Create an IDbCommand object, set the CommandText and call ExecuateScalar.  The SQL could be as simple as "select dbo.fnXXXXXXXXXXXX()".

 

Previous Previous
 
Next Next
ForumForumMainstream Foru...Mainstream Foru...DevelopersDevelopersAdding a Stored ProcedureAdding a Stored Procedure