Solved

How to populate database fields with default values through TDBEDIT

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi Dbf export problem to a Visual Foxpro application 6 208
add combobox item based on numbers 9 154
RESTRequest Parameter 4 43
firemonkey Android Listview Sort items 7 55
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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

820 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