Solved

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

Posted on 2006-06-28
3
1,049 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article will show, step by step, how to integrate R code into a R Sweave document
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

860 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