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:
- Create a subclass of mmDataAccessSql (for example, myDataAccessSql)
- Override the GetEmptyDataSet() method with your custom code that calls a stored procedure
- 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