473,224 Members | 1,607 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

Null datetime stopping position change


I have a problem with the following if the EndDate on the database is
Null. Knowing this I can code around it but not knowing it was a very
frustrating experience!

endDateTimePicker.DataBindings.Add(new Binding("Value",
MyDB.GameBindingSource, "EndDate"));

when I move position onto a record with a null enddate the BindingSource
it moves back again.

If anyone has a really good solution to the problem please let me know.

Ta
Ken

Aug 25 '08 #1
2 1327
On Aug 25, 5:18*am, Ken Foskey <rmove.fos...@optushome.com.auwrote:
I have a problem with the following if the EndDate on the database is
Null. *Knowing this I can code around it but not knowing it was a very
frustrating experience!

endDateTimePicker.DataBindings.Add(new Binding("Value",
MyDB.GameBindingSource, "EndDate"));

when I move position onto a record with a null enddate the BindingSource
it moves back again.

If anyone has a really good solution to the problem please let me know.

Ta
Ken
Hi,

Can you better explain your problem? I got confused with the "move
back"/forward
Aug 25 '08 #2
On Mon, 25 Aug 2008 08:34:02 -0700, Ignacio Machin ( .NET/ C# MVP ) wrote:
On Aug 25, 5:18┬*am, Ken Foskey <rmove.fos...@optushome.com.auwrote:
>I have a problem with the following if the EndDate on the database is
Null. ┬*Knowing this I can code around it but not knowing it was a very
frustrating experience!

endDateTimePicker.DataBindings.Add(new Binding("Value",
MyDB.GameBindingSource, "EndDate"));

when I move position onto a record with a null enddate the
BindingSource it moves back again.

If anyone has a really good solution to the problem please let me know.

Ta
Ken

Hi,

Can you better explain your problem? I got confused with the "move
back"/forward
I have 4 rows. Rows 0 and 3 have dates in the EndDate column, Rows 1
and 2 do not have dates.

If I set position to 0 or 3 it works correctly, Current changes.

If I set position to 1 or 2 it very briefly changes (form title bar is
tied to the database table) and then changes back, if I start at 0 it
switches to 1 then immediately switches back to 0. If I start at 3 it
switches to 1 then immediately switches back to 3.

Once I remove the databinding on the datetime component it works fine.

This also breaks AddNew because the date time of a number of fields are
null and I have to set up the record then MoveLast to switch it.

Thanks
Ken
Aug 25 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Pet Matrix. | last post by:
Hi, I am having the schema and one element in that schema is , <xs:element name="EndT" type="TstampType" minOccurs="1" maxOccurs="1"/> How do I represent the NULL value for the datatype dateTime...
8
by: Manish Jain | last post by:
Platform : ASP.Net/C# void SomeFunction(DateTime date) { string text = date.ToString(); //This crashes if date is null } I am using a construct similar to above. I want to check if the date...
6
by: Markus E▀mayr | last post by:
Hello, I'd like to consume a WebService, which returns an array of objects which include several members of type System.String, System.Decimal and System.DateTime. In the WSDL-file, the members...
12
by: melanieab | last post by:
Hi, I'm trying to check and see if something other than numbers (either the +, -, *, or /) are entered into a textbox, where bigR is what I call the text in the textbox. I can get what was...
5
by: tshad | last post by:
I have the following code: *************************************************************************** Dim CommandText as String = "INSERT INTO ftsolutions.dbo.position (client,dateposted) VALUES...
5
by: AAJ | last post by:
Hi Does anyone know of any good publically available set of standards for managing dates when dealing with a database server (in my case SQL Server 2000 and c# VS2005). At the moment, if I...
6
by: naurus | last post by:
i'm making a javascript visualization effect, and i'm having some trouble with the stopping the main function when a certain particle reaches 100% height: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML...
0
by: tschroeder250 | last post by:
Hi Everyone, There are so many Nullable DateTimePickers out there that this post may not even be found among all the others, but I wanted to try. First, I want to thank all the authors of the...
4
by: shapper | last post by:
Hello, I have the following: DateTime c = database.Posts.Max(b =b.CreatedAt).Value; b.CreatedAt is of type "DateTime?" The problem is when database.Posts is empty. I get an error:...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.