Solved

SQL

Posted on 1998-11-26
4
148 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

737 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