Solved

How to populate database fields with default values through TDBEDIT

Posted on 2001-06-07
2
197 Views
Last Modified: 2010-04-06
I've got an order entry screen and I want to default the ship-to address into the order header record for the customer id entered by the user.
I've got to the point where for a customer id entered by the user, I query the database (Oracle) and I use the following command to set the address onto the edit fields of the screen
  dbedtSHIP_ADDR1.Text := qryCustSHIP_ADDR1.AsString;
This displays the address information on the screen, but when the user commits the record, the values do not get posted to the database. They just get "thrown away". It's as though the screen does no know that data has been added to these fields. I've tried setting the Modified property for the field but this did not help.
0
Comment
Question by:fgraham
2 Comments
 
LVL 4

Accepted Solution

by:
DMN earned 50 total points
ID: 6165775
if dbedtSHIP_ADDR1 is really TDBEdit control then should be:

dbedtSHIP_ADDR1.Field.AsString := qryCustSHIP_ADDR1.AsString;
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 6165793
Usually you can do that in the database itself in the field definition.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
add combobox item based on numbers 9 144
Print Graphic and Text to Epson TM-T88v 12 261
delphi parse string to params 3 123
Reconfigure Delphi Install? 2 51
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
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…

822 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