Board index » delphi » Alter table, how to setup default field values?

Alter table, how to setup default field values?

Hi,
I'm using Paradox7, and by using the sentence:

'ALTER TABLE "myTable" ADD AStringField CHAR(100)'

I can add a field of type char named AStringField to myTable

How can I specify the default value of the field?
I mean, by using the Database Desktop you can assign a default
value to be assigned automatically to a field after an append.
But I can't figure out how do that with ALTER TABLE.

Regards
Mauricio

 

Re:Alter table, how to setup default field values?


You cannot do that with SQL. The only way to set the default value is with
BDE API functions.

--
Bill
(TeamB cannot answer questions received via email)

Re:Alter table, how to setup default field values?


Quote
> You cannot do that with SQL. The only way to set the default value is with
> BDE API functions.

Hi,
the only solution is the 'cumbersome' dbiDoRestructure function?
regards
Mauricio

Other Threads