Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL

Posted on 1998-11-26
4
Medium Priority
?
158 Views
Last Modified: 2010-04-04
I Know the SQL statement to find data in a database.
My problem is however how can I return my data that I juse
for example in a Tedit to my SQL statement.
0
Comment
Question by:cp_st_w
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
ronit051397 earned 100 total points
ID: 1348176
with Query1 do
begin
  SQL.Text:='select field1 from table1';
  Open;
  Edit1.Text:=FieldbyName('field1').AsString;
end;

0
 

Author Comment

by:cp_st_w
ID: 1348177
What SQL statement must I use and I get a error

Field not Found
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1348178
can you post some code, so I can see what is the problem?
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1348179
hi cp_st_w,

an other example

with Query1 do
begin
  SQL.Text:='select CustNo, OrderNo from Orders';
  Open;
  Edit1.Text:=FieldbyName('CustNo').AsString;
  Edit2.Text:=FieldbyName('OrderNo').AsString;
end;

Other method

with Query1 do
begin
  SQL.Text:='select CustNo, OrderNo from Orders';
  Open;
  Edit1.Text:=Fields[0].AsString;  {CustNo}
  Edit2.Text:=Fields[1].AsString;  {OrderNo}
end;

i agree with ronit, post some code

meikl
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

963 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