Page 1 of 1

Handling event

Posted: Fri 04 Jun 2010 19:43
by HeleneC
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

Posted: Tue 08 Jun 2010 17:37
by StanislavK
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.