hello and thank you
but i understand your reply 50%..
MyQuery.SQL.Clear; //understand
MyQuery.SQL.Add('SELECT * FROM AnyTable'); //understand
but, MyQuery.SQL.Add('WHERE Field_0 = :Value_0'); i understand not at all. do you mean it like (using TEdit as value source):
Code: Select all
MyQuery.SQL.Add('WHERE Name = ' + Edit1.Text + ', Gender = ' + Edit2.Text + ', Title = ' + Edit3.Text); (etc. etc.) ??
or how do i do it? I have some edits/comboboxes and need it as search value (but only if they are not empty) and then use it for the search process.
next one i dont understand right is:
Code: Select all
MyQuery.ParamByName('Value_0').AsString := 'Any_Value'; // assigning parameter value
for what is it and how do i have to understand/use it?
last one:
Code: Select all
AnyClass.Property_1 := MyQuery.FieldByName('Filed_1').AsString; // assigning string property
AnyClass.Property_2 := MyQuery.FieldByName('Filed_2').AsInteger; // assigning integer property
this i understand not at all. There i see only from which field but not fro which line and i have there a question because this looks like it uses only one match search and put its into a class. But what i need is to creat for each matches (from 10000 table entries are like 20 entries matches) a new instance from a class and put the next matched data from table line into the instance. I know how to creat instances and so on, but i dont see how to do the search that each match can be used for that what i need.
Or is after MyQuery.Open; all found data (like 20 table entries) in TMyQuery? How do i get it then? So i could do a for loop and creat DynamicArrays and the needed instances and put the found data for each one. hope you can understand me
