EDN Admin
Well-known member
Hi All
Thank you for take time to read my post and your precious help.
I have a sdf database named Database1. A Table named Products. A field named PreOrderDate type DateTime, A field named ReleaseDate type DateTime. and some other fields.
I drag and drop the Table in a Form a datagridview is automatically created.
Now what I want is for these two fields to have default value of Today.
I was able to set a default value for a field named Name type String to Hello World, what I did was go to the DataSource>Edit DataSet with Design> Select Name field and then in the property panel change the Default Value between < >. I tried the same for the PreOrderDate. I typed <Today>. I get error says "Property Value not valid>Detail information is: String is not recognized as DateTime.
I dont want a static datetime as 5/5/2013 but each time the app is run and new record will be created the default value will be the Today of that particular day.
I have search the msdn but did not find any good lead, Could someone please show me some keywords or links?
Thank you for your time and appreciate you help.
Edit: Thank you I have found a way by accessing the Partial class of dataset.vb
Option Strict On
Helpful Links:
View the full article
Thank you for take time to read my post and your precious help.
I have a sdf database named Database1. A Table named Products. A field named PreOrderDate type DateTime, A field named ReleaseDate type DateTime. and some other fields.
I drag and drop the Table in a Form a datagridview is automatically created.
Now what I want is for these two fields to have default value of Today.
I was able to set a default value for a field named Name type String to Hello World, what I did was go to the DataSource>Edit DataSet with Design> Select Name field and then in the property panel change the Default Value between < >. I tried the same for the PreOrderDate. I typed <Today>. I get error says "Property Value not valid>Detail information is: String is not recognized as DateTime.
I dont want a static datetime as 5/5/2013 but each time the app is run and new record will be created the default value will be the Today of that particular day.
I have search the msdn but did not find any good lead, Could someone please show me some keywords or links?
Thank you for your time and appreciate you help.
Edit: Thank you I have found a way by accessing the Partial class of dataset.vb
Option Strict On
Helpful Links:
View the full article