Solved

SQL

Posted on 1998-11-26
4
155 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
ronit051397 earned 50 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month8 days, 11 hours left to enroll

617 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