Page 1 of 1

RefreshRecord and Tablename

Posted: Sat 01 Feb 2014 10:49
by mohamad
Hi,
In TMSQuery I have used the View and when I run the RefreshRecord method, TMSQuery Sends to SQL Server command with additional Condition:

MyView :
Select ATable.*, BTable.*
from ATable
inner join BTable on BTable.ATableID = ATable.ID



my query(in TMSQuery) :
Select *
from MyView


when I run RefreshRecord, These commands are sent to SQL Server :
Select *
from MyView
where ATable.AField = 10

But there is no table name, How can I prevent inserting table name?

Re: RefreshRecord and Tablename

Posted: Wed 05 Feb 2014 16:04
by AlexP
Hello,

For the time being, to solve the problem, you should use your own SQL query for data update:

Code: Select all

  MSQuery1.SQLRefresh.Text := 'Select * from MyView where AField = :AField';