Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
NewRow call Stored Proc
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01139205
Message ID:
01139557
Views:
9
Dan,

>I have put these commands in a stored procedure and want to call the stored procedure when the NewRow() method is called. How do I do this?

The code you posted is ultimately called from your data access object's GetEmptyDataSet() method. To override this method to call a stored procedure instead, do the following:

  1. Create a subclass of mmDataAccessSql (for example, myDataAccessSql)

  2. Override the GetEmptyDataSet() method with your custom code that calls a stored procedure

  3. To get MM .NET to instantiate your custom class, go to your application's Factory.cs file and override the CreateDataAccessSql() method, and return an instance of your custom class. For example:
    public virtual mmDataAccessSql CreateDataAccessSql()
    {
    	return new myDataAccessSql();
    }


Now whenever a SQL Server data access class is instantiated, it will instantiate your myDataAccessSql class instead.

Best 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
Previous
Reply
Map
View

Click here to load this message in the networking platform