RefreshRecord and Tablename

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mohamad
Posts: 4
Joined: Sun 18 Dec 2011 09:52

RefreshRecord and Tablename

Post by mohamad » Sat 01 Feb 2014 10:49

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?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: RefreshRecord and Tablename

Post by AlexP » Wed 05 Feb 2014 16:04

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';

Post Reply