Board index » delphi » dbiDoRestructure Setting Default Value for String Field

dbiDoRestructure Setting Default Value for String Field

Does anyone have some example code they would post for setting the default
value for field types other than integer?  What is there about the example
fDbiDoRestructure  at
http://www.borland.com/devsupport/bde/bdeapiex/dbidorestructure.html that I
must modify?

Or am I missing an easier way to declare default values when creating a
table programatically?

Thanks for any suggestions.

Reed suckow

 

Re:dbiDoRestructure Setting Default Value for String Field


Quote
>Or am I missing an easier way to declare default values when creating a
>table programatically?

Set the DefaultExpression property of the Tfield component
or write some code for the ttable NewValue event

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:dbiDoRestructure Setting Default Value for String Field


On Tue, 14 Sep 1999 07:05:47 -0700, "Reed suckow" <paper...@pclv.com>
wrote:

Quote
>Does anyone have some example code they would post for setting the default
>value for field types other than integer?

For example:
  string:
     StrPCopy(PChar(@VCheck.aDefVal), MyDefString);
  float:
     PDouble(@VCheck.aDefVal)^ := MyDefFloat;

Jan

Re:dbiDoRestructure Setting Default Value for String Field


My thanks to Brian and Jan for their suggestions.

Reed

Other Threads