StrataFrame Forum

Business Object execute question...

http://forum.strataframe.net/Topic7795.aspx

By Robin J Giltner - 3/29/2007

I noticed that the methods on the Businessobjects for executescalar and executenonquery where marked as protected, and thus aren't available to my instantiated business objects in my applicaiton.

So I went in and made a public function to execute a sqlcommand parameter.  Im guessing there is a good reason you didn't include these methods as public, but Im wondering what the reprocusions of my adding a method to execute a sqlcommand from the busniness object would be.

And btw, I've been getting a lot of errors when trying to use the forum, mainly when trying to list a forum from the forum main page.

Thanks,

Robin Giltner

By Trent L. Taylor - 3/29/2007

And btw, I've been getting a lot of errors when trying to use the forum, mainly when trying to list a forum from the forum main page.

Blush sorry about this....we are talking with InstantASP trying to get this resolved.  Apparently there are issues with the indexes be fragmented but not allowing rebuilds to correct the issue.  We will add a post once this is corrected letting you know.

Im guessing there is a good reason you didn't include these methods as public, but Im wondering what the reprocusions of my adding a method to execute a sqlcommand from the busniness object would be.

Yes.  You are trying to access these methods on a BO outside of the BO itself.  In this case just use the data access layer versus creating some method to illogically work around the protected definition.

MicroFour.StrataFrame.Data.DataBasics.DataSources(0).ExecuteScalar(...)
By Robin J Giltner - 3/29/2007

I figured as much, and thats how I had been using the Data layer.  Would using that method still work fine if the Middle Tier server were in play ?

Thanks,

Robin

By Trent L. Taylor - 3/29/2007

Would using that method still work fine if the Middle Tier server were in play ?

Yes.  If you were using the Enterprise Server then your DAL would be an EnterpriseDataSourceItem instead of an SQLDataSourceItem which would properly interpret and relay all of the logic.

By Robin J Giltner - 3/29/2007

Whew, thats what I was hoping :-)

Thanks Trent.

Robin Giltner

By Trent L. Taylor - 3/29/2007

No problem Smile