tags:

views:

81

answers:

1

Trying to get started with subsonic but have a simple question about stored procedures - just can't seem to understand the context of the examples i've seen, like this one:

SubSonic.StoredProcedure sp = SPs.CustOrderHist(customerID);
GridView1.DataSource = sp.GetReader();

In this line, what is this object SPs? can't seem to find it... is this a class subsonic should generate? I don't have this in my project. TIA!

+1  A: 

SPs is a class that SubSonic will generate. As with the object classes, the SPs class file has to be added to the project. Also, if you don't have Stored Procedures in you database, obviously, the SPs class will be totally empty.

jimyshock
OK, thank you - that helped me focus my troubleshooting. I had to make sure my user had execute permissions on the stored procedures and I also added useSPs="true" to the config. I'm not sure which one fixed it but now I do have a class. So now I'm up and running. Thanks again!
Meg