Avatar of TG-Steve
TG-Steve
 asked on

Delphi reading cell data into TMemo

Hi Guys

i am trying to perform the below query but it does not work and i have obviously not done it correctly. i am trying to read a single cells data back into a form. i orginally write data into the form and insert it into a remote mysql database but if the user puts a number in the edit1.txt i want to query first to see if there is data present and if not they can then populate it via another procedure

ADOQuery2.close;
ADOQuery2.SQL.text := ('SELECT description FROM Data_description WERE rootplu = (''edit1.text'')');
Memo1.Lines.Text := ADOQUERY2.FieldByName('description').AsString;
ADOQuery2.ExecSQL;
ADOQuery2.Close;
Delphi

Avatar of undefined
Last Comment
TG-Steve

8/22/2022 - Mon
Superdave

You spelled WHERE wrong, and also wouldn't the ExecSQL come before the assignment of the result?
ASKER CERTIFIED SOLUTION
jimyX

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
TG-Steve

ASKER
Thank you JimyX
Your help has saved me hundreds of hours of internet surfing.
fblack61