I have a certain number stored in int i.
I want to search a table for all entries in a certain field that match i.
Could someoen show me a quick code snippet on how to do this?
I assume using a TMyQuery component would be the best way? I guess I am a bit confused as to how to mingle the c++ code with a SQL statement.
Thanks!
---Dave
Newbie SQL question in builder 6.0
In your case you should use something like this:
For more information please read MyDAC help or see MyDAC demos.
Code: Select all
MyQuery->SQL->Text = "select * from Table1 where Field1 = :pram1";
MyQuery->ParamByName("pram1")->AsInteger = i;
MyQuery->Open();-
Guest