Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Unable to select data from Oracle DB

Posted on 2005-05-14
2
Medium Priority
?
159 Views
Last Modified: 2010-04-05
I want to select wanted data from from Oracle Db
in table fcarte i have two columns: id_cli, id_clcrd
In labelededit i write: 000000000000047D

Press button and i get error:
SQL command not properly ended

procedure TForm1.Button1Click(Sender: TObject);
begin
  AdoQuery1.SQL.Clear;
  AdoQuery1.SQL.Add('Select id_clcrd, id_cli from fcarte where id_clcrd = '+LabeledEdit1.text+'');
  AdoQuery1.Open;
end;

HOW TO FIX IT?
0
Comment
Question by:selas
2 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 2000 total points
ID: 14003234
try

  AdoQuery1.SQL.Add('Select id_clcrd, id_cli from fcarte where id_clcrd = '+quotedstr(LabeledEdit1.text));

meikl ;-)
0
 

Author Comment

by:selas
ID: 14003251
Thanks :)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month20 days, 14 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question