Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2006-06-28
3
Medium Priority
?
1,060 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 2000 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

Independent Software Vendors: 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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Starting up a Project
Loops Section Overview

610 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