When use SQLInsert, SQLDelete... From TVirtualQuery

When use SQLInsert, SQLDelete... From TVirtualQuery

Postby Eden0928 » Wed 06 Jul 2016 08:17

Could you tell me about when use property: SQLInsert, SQLDelete, SQLUpdate from TVirtualQuery?
Eden0928
 
Posts: 44
Joined: Sun 22 Apr 2012 14:08

Re: When use SQLInsert, SQLDelete... From TVirtualQuery

Postby AlexP » Wed 06 Jul 2016 08:47

Hello,

These properties are used to set insert/update/delete queries. If you haven't set these queries, they will be generated automatically. These queries are used when calling methods Insert[Append]/Edit/Delete.
AlexP
Devart Team
 
Posts: 5525
Joined: Tue 10 Aug 2010 11:35

Re: When use SQLInsert, SQLDelete... From TVirtualQuery

Postby Eden0928 » Wed 06 Jul 2016 09:03

AlexP wrote:Hello,

These properties are used to set insert/update/delete queries. If you haven't set these queries, they will be generated automatically. These queries are used when calling methods Insert[Append]/Edit/Delete.


We can get generated automatically SQL when Insert(Append).

The SQL can auto execute from sourceDataSet.connection? or Only history?

I have no idea about take the SQL can to do?
Eden0928
 
Posts: 44
Joined: Sun 22 Apr 2012 14:08

Re: When use SQLInsert, SQLDelete... From TVirtualQuery

Postby AlexP » Thu 07 Jul 2016 09:01

Yes, if these properties are not set, SQL queries will be generated automatically. On query executing, VirtualQuery will refer to the already retrieved data in the dataset; the source dataset won't be re-opened or refreshed.
AlexP
Devart Team
 
Posts: 5525
Joined: Tue 10 Aug 2010 11:35


Return to VirtualDAC