Solved

Vb.NET/ DataTable.Column.DefaultValue /VB.NET 2005

Posted on 2006-06-28
3
1,034 Views
Last Modified: 2007-12-19
DataTable.Column.DefaultValue

Hi,

I have a DataTable in my DataSet with a "datetime" Column. I can specify a
DefaultValue for this Column using a String such as "01/01/2006" etc but can
I set it to default to today?
Something like ".DefaultValue = DateTime.Today" but do this in the designer
and not in code

i implement default value in SQL table level the GetDate() is accepted but does not seem to carrier
over to the DataSet
 
any help?
 
0
Comment
Question by:ali_alannah
3 Comments
 
LVL 2

Accepted Solution

by:
raahgeer earned 500 total points
ID: 16999809
it should work if you do assign current date time in "InitVars" method in desiner of that data table.
"initVars" can be found in dataset desiner code file, if you enable "show all files"  from "solution explorer"
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Delphi Mdi application Child forms get behind control 7 111
changeXy challenge 13 57
nestparen challenge 4 56
Path to Python 9 39
A short article about a problem I had getting the GPS LocationListener working.
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

707 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now