Solved

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

Posted on 2006-06-28
3
1,054 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
backup program with robocopy 6 90
Eclipse with various Java releases 7 85
what is the best Integrated development environment 2 65
VLC command 34 79
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

732 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