Welcome Guest.   Make a donation to an author on the site November 23, 2014, 09:55:17 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2010! Download 24 custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Stupid database date picker  (Read 2551 times)
chedabob
Participant
*
Posts: 34


C# Master (if only!!!)

View Profile Give some DonationCredits to this forum member
« on: January 17, 2007, 07:09:35 AM »

Right, so I have a date picker, for my database. The only problem is, despite the fact that the date is shown onscreen, its never passed into the database, unless the user clicks a value. See, its not normally a problem, but if the date selected is already correct, the average user won't change it. So then it doesn't go into the database, and when I search later, I can't find it, because there is no date.

So, is there an easy way to force the database to use the value shown onscreen?
Logged
tinjaw
Supporting Member
**
Posts: 1,926



I'm so glad breakbeat techno isn't an illegal drug

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: January 17, 2007, 08:50:27 AM »

I'd love to help, but I have no clue what you doing. What language are you programming in? What tools are you developing in? How are you connecting to the database? etc.
Logged

 
chedabob
Participant
*
Posts: 34


C# Master (if only!!!)

View Profile Give some DonationCredits to this forum member
« Reply #2 on: January 17, 2007, 09:33:41 AM »

Oops, forgot to mention.


Im using C#, in Visual C# Express 2005

I connected the database with the standard "Add data source" wizard.

Logged
tinjaw
Supporting Member
**
Posts: 1,926



I'm so glad breakbeat techno isn't an illegal drug

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: January 17, 2007, 04:46:16 PM »

In general terms there should be an event for when the data is being committed to the database. In that event check the value of the date field. If the value is null, then grab the value of the calendar control. Set the data field to the value of the calendar control.

Sorry, but I don't know C#, [ yet  Wink ], nor do I have Visual C# installed, so I can't be more specific than that presently. But the info I've provided should get you where you need to be.
Logged

 
chedabob
Participant
*
Posts: 34


C# Master (if only!!!)

View Profile Give some DonationCredits to this forum member
« Reply #4 on: January 18, 2007, 03:32:03 PM »

Well, I found a default value setting with the TableAdaptor, but it throws a wobbler when I set it. Im gonna speak to my tutor at college, when it opens again (the roof blew off :O)
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.03s | Server load: 0.01 ]