Solved

How to populate database fields with default values through TDBEDIT

Posted on 2001-06-07
2
191 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
Comment Utility
if dbedtSHIP_ADDR1 is really TDBEdit control then should be:

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

Expert Comment

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

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now