Greetings all,
I have a MySQL database running on a Linux server and wanting to access
it from Windows. I have the database connection all working correctly. I
am using the tables and the query from the BDE components and can edit
the database perfectly through the tables but am having no success in
the code for the query. The query component has a basic query that works
well in the component itself.
select * from Service
order by CustNum,Invoice;
In code, I execute another query to isolate just one person as follows:
with Query do begin
if Active then Close;
if Prepared then Unprepare;
SQL.Clear;
SQL.Add('select * from Service');
SQL.Add('where CustNum=9');
SQL.Add('order by Invoice;');
Prepare;
Open;
end;
I was hoping to get all the records for customer number 9 from this
query but I get the records of all customers ordered as before. This
seems to suggest that the query is not working at all. I have used this
sort of query before for local DBase files with no problems. What am I
doing wrong now? Can anyone please help?
Greg
g_gailer@[EMAIL PROTECTED]