TMyQuery (No SQL Statement Provided)

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
vladimirwilson
Posts: 4
Joined: Mon 15 Sep 2008 10:06

TMyQuery (No SQL Statement Provided)

Post by vladimirwilson » Thu 05 Nov 2009 11:54

hi Guys,

i am getting an error from TMyQuery (No SQL Statement Provide)

according to my logs it appear to happen after counting the records... here is a brief example of the code:

TMyQuery.SQL := 'SQL Statement'

while not TMyQuery1.EOF do
begin
TMyQuery1.SQL := 'SQL Statement'

if TMyQuery1.RecordCount > 0 then
DoSomenthing

end;
i know the error is very clear, but i do not understand why its happening...

Can you guys give me any sugestions?

Thank you,
Vladimir

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 05 Nov 2009 12:06

This means that the TMyQuery.SQL property is empty.
Please try to compose a small sample to demonstrate the problem and send it to dmitryg*devart*com.

vga
Posts: 58
Joined: Sat 08 Jul 2006 12:04

Post by vga » Fri 13 Nov 2009 22:48

change TMyQuery.SQL := 'SQL Statement'
to TMyQuery.SQL.text := 'SQL Statement'


ok?

Post Reply