David,
>I have a problem with this scenario. I have a BO that generates the record of his childs in automatic way. I'm doing this with a method that calls an SP in this way:
>
>public void GenerateChildRecords( int parentID )
>{
> this.ExecSproc( "pr_GenerateChildRecords", this.CreateParameter("@id_Parent", parentID)
>
> return;
>}
>
>But the BO is throwing a OUT OF TIME CONNECTION error. If I remove all the logic in the SP that affects data (all the delete an inserts transact-sql commands) it does not trhow any error.
>
>What am I doing wrong? Do I need to generate a separate Data Access Class in order to acomplish that? Can I do this with a simple ExecSproc?
It's hard to say without knowing more about this particular scenario. I recommend trying to execute the sprocs outside the context of the business object to get a clearer picture of what's happening. FYI, you can set the CommandTimeout property of your data access class if need be. Check out the MM .NET Dev Guide topic "Setting the Command TimeOut" for more information.
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com