views:

382

answers:

2

I setup a simple select SP to return some rows use the templates to generate the StoredProcedures.cs file and then attempt to call the SP and get a Dataset back;

SubSonic.Schema.StoredProcedure sp = GetSPData(userID);
var data = sp.ExecuteDataSet().Tables[0];

The errror I receive is this:

The SelectCommand property has not been initialized before calling 'Fill'.

I am using Subsonic v3.0.0.3.

Am I missing something?

+3  A: 

Not sure if answering my own question is bad mojo, but since I figured out the issue I figured I would share for potentially others benefit.

Seems there was a fix for executing stored procedures for Subsonic but it didn't make it into the 3.0.0.3 release. From the GitHub repository download a tarball, unzip, open in VS2008, rebuild (be sure you make a Release build) and use that Subonic.Core.Dll versus the one in the 3.0.0.3 release. This works and the Stored Procedure is successfully executed.

Woot!

CmdrTallen
A: 

Thanks a lot, i will try this in a minute. BTW, this is not the 1st time i am having problems with SubSonic. This is the last time i am using them as ORM.

Jacob.

Yuki