Dear Support,
I use last version of SDAC 4.x prof and Delphi 2007 with last service pack on MS Vista business with sp 1 in italian language.
I have a simple question...
With Delphi I create a simple project with a TMSConnection, TMSQuery,TDatasource,TDBNavigator and a TDBGrid .
I set with MSQuery editor SQL property : select * from and with your editor I generate Insert/Update/delete and Refresh statemnents.
After this I set options - DefaultValues of TMSQuery - equal true and compile my project.
I have a 3 fields :
FIELD1 type Bits/boolean default value 0
FIELD2 type datetime default value getdate()
FIELD3 type varchar(30) default value user_name()
I run my project and when I insert a record with Insert I see correctly the default value.
When I Edit a record and then Post value I don't see any changes in my 3 fields. In details FIELD2 is the same, the time is not changed...
Is it correct ?
Best regards.
Sergio Bertolotti
DefaultValues of TMSQuery info
-
- Posts: 54
- Joined: Tue 02 May 2006 12:03
- Location: Italy
Default values are used on new record inserting when the field value is not provided. If you want to set the default field value on update, you should provide the default keyword in your queries instead of the field value. Please, take a look at this post for more information.
-
- Posts: 54
- Joined: Tue 02 May 2006 12:03
- Location: Italy