Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
NewRow call Stored Proc
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01139205
Message ID:
01139557
Vues:
10
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform