Solved

Inserting from databse into textfield

Posted on 2006-07-08
3
187 Views
Last Modified: 2010-04-05
I have a ms access database. I successfully set up a connection. Now, how to insert from database into textfield and vice versa? Thank you.
0
Comment
Question by:RealSnaD
[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
3 Comments
 
LVL 4

Expert Comment

by:LMuadDIb
ID: 17066712

Data browsing and navigation
page1 - http://delphi.about.com/od/database/l/aa032001a.htm
page2 - http://delphi.about.com/od/database/l/aa032001b.htm

A Beginner's Guide to Delphi Database Programming:
http://delphi.about.com/od/database/a/databasecourse.htm

Data modifications:
http://delphi.about.com/od/database/l/aa041701a.htm

http://delphi.about.com/od/database/l/aa050101a.htm

there are alot of ways to do what you ask, but the above links should help to get you started
0
 
LVL 5

Accepted Solution

by:
Scay7 earned 50 total points
ID: 17067657
if adotable1.locate('table name','primary key',[]) then  //first locate the record 'if' exists
begin
edit1.Text := adotable1.FieldValues['db row name']
end else showmessage('Record not found');

if adotable1.locate('table name','primary key',[]) then  //first locate the record 'if' exists
begin
adotable1.Edit;
adotable1.FieldByname('db row name').AsString := edit1.Text;
adotable1.Post;
end else showmessage('Record not found');

the above mentioned is for when the table has been made and when the primary keys are set eg : the db has already been layed out...

Peace Scay7
P.s not a 50 point Q
0
 
LVL 12

Expert Comment

by:Ivanov_G
ID: 17068634
use TDBEdit, just assign the DataSource and specify the field you want to display
0

Featured Post

Independent Software Vendors: 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

Suggested Solutions

Title # Comments Views Activity
LAN or WAN ? 11 121
Firemonkey DbLookupComboBox equivalent ? 2 79
Multi-layered image in FireMonkey 9 94
how to make 2 step back? ..\..\ ExtractFilePath (paramstr(0)) 5 84
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

752 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