Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Writing SQL to a TQuery in Delphi

Author  Topic 

May82
Starting Member

7 Posts

Posted - 2004-04-26 : 11:24:41
Hello there,

I need to include the SQL lines below into a TQuery component. However, when retrieving the record using the field ICNo, i cant determine the exact value, because it is determine by the user during run time, where the user will select a specific record. In searching for the specific record, i used

dm1.tblClient.gotokey; //primary key is ICNo

So, I want to know whether there is a way to pass the value of the record which is retrieve into the SQL statement.

SELECT ICNO, CNAME, GENDER, AGE, DOB, CADD, CPHONE,CSMOKE, CLASS, PAYBASIS, PAYMETHOD
FROM CLIENT
WHERE ICNO = ??


Thanks in advance!



Newbie =)
   

- Advertisement -