Handling event

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Microsoft SQL Server
Post Reply
HeleneC
Posts: 5
Joined: Thu 22 Oct 2009 00:57

Handling event

Post by HeleneC » Fri 04 Jun 2010 19:43

Hello again,

In Delphi, using SDAC, I'm used to have a lot of event (beforeinsert, afterinsert, beforeclose, etc) with TMSTable or TMSQuery component with which I could insert code.

With dotConnect for SQLSERVER how do I handle specific action to get done at the dataset level. For example: just after inserting a new record or before updating data.

I just don't know how to handle this with dotConnect for SQLSERVER.

Do you have a demo for this? Does it all need to be program by myself for each open table?

Sorry for this. I'm so confuse right now with .NET and Visual Studio new programming environment.

Wish you can help...

Best regards,

Helene

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Tue 08 Jun 2010 17:37

The events you are requesting are available for the SqlDataTable class. For details, please see
http://www.devart.com/dotconnect/sqlser ... mbers.html

As for SqlDataSet, there are no such events by default, but you may declare a custom event and raise it from the corresponding event handler of each SqlDataTable that belongs to this SqlDataSet. For complete information on how to declare, raise, and handle events in .NET Framework, please refer to the MSDN documentation:
http://msdn.microsoft.com/en-us/library/wkzf914z.aspx

Feel free to contact us if something is unclear.

Post Reply