Solved

How to populate database fields with default values through TDBEDIT

Posted on 2001-06-07
2
206 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
[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 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

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

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…
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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
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…

707 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