Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB Connectivity » View Thread |
Messages 1 to 10 of 14 total |
Date type issue with ADO provider |
Sat, Jul 26 2008 8:47 AM | Permanent Link |
"Jan-Erik Johansen" | Hi,
I'm having serious problems using the Date datatype with ASP.NET. Lets say I have the following table definition UID Integer RegDate Date and the following data 1 12/13/1994 2 11/17/1999 When I display the data in a Grid (either the standard GridView or Developer Express APSXGridView) the data is shown as 1 12/13/1994 12:00:00 AM 2 11/17/1999 12:00:00 AM Notice that 12:00:00 AM is displayed as if it was a DateTime field. (.NET does not have a Date datatype, only a DateTime datatype so I don't know if the time part is added by you or the .NET framework) If I edit and try to update the record I get an error "Specified cast is not valid" and an Exception is thrown. [InvalidCastException: Specified cast is not Valid.] Elevate.ElevateDB.Data.Engine.TEDBValue.SetAsVariant(Object Value) + 606 ....... There must be something going on with the time part of the date that confuses the process. -- Jan-Erik using VS2008 |
Sun, Jul 27 2008 9:40 AM | Permanent Link |
"Jan-Erik Johansen" | BTW I'm using 2.01 Build 1
Just to make it clear, I did try the appropriate date formatting settings ("d" and "D") and they don't make any difference. -- Jan-Erik |
Sun, Jul 27 2008 11:55 AM | Permanent Link |
Chris Holland SEC Solutions Ltd. Team Elevate | Hi Jan,
try setting the format field to be "dd/MM/yyyy" that should do it. (notice the capital M's) Chris Holland [Team Elevate] Jan-Erik Johansen wrote: > BTW I'm using 2.01 Build 1 > > Just to make it clear, I did try the appropriate date formatting > settings ("d" and "D") and they don't make any difference. > > -- > Jan-Erik |
Sun, Jul 27 2008 1:28 PM | Permanent Link |
Jan-Erik Johansen | "Chris Holland [Team Elevate]" wrote:
<< Hi Jan, try setting the format field to be "dd/MM/yyyy" that should do it. (notice the capital M's) >> This is what "d" does if the current Culture maps to "dd/MM/yyyy", which it does in my case by default. In the US "d" would map to "MM/dd/yyyy" using the "en-US" Culture. The preferred setting would in most cases be "d". I did try your suggestion (just in case) but the result is the same, "Specified cast is not valid" -- Jan-Erik |
Mon, Jul 28 2008 3:51 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jan-Erik,
<< If I edit and try to update the record I get an error "Specified cast is not valid" and an Exception is thrown. [InvalidCastException: Specified cast is not Valid.] Elevate.ElevateDB.Data.Engine.TEDBValue.SetAsVariant(Object Value) + 606 >> This is a known bug and will be fixed in 2.01 B2, which I'm finally starting on today. It should be available by early tomorrow morning at the latest. Also, are you updating the row via the grid, or in code ? Once I know that, I might be able to give you a workaround. -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Jul 28 2008 5:27 PM | Permanent Link |
"Jan-Erik Johansen" | "Tim Young [Elevate Software]" wrote
> > << If I edit and try to update the record I get an error "Specified cast > is not valid" and an Exception is thrown. > [InvalidCastException: Specified cast is not Valid.] > Elevate.ElevateDB.Data.Engine.TEDBValue.SetAsVariant(Object Value) + 606 > >> > > This is a known bug and will be fixed in 2.01 B2, which I'm finally > starting on today. It should be available by early tomorrow morning at > the latest. > > Also, are you updating the row via the grid, or in code ? Once I know > that, I might be able to give you a workaround. > Tim, Most edits are done using ASPxGridView, I did a check on timestamp and as far as I can see it's the same issue on that one as well. If there is a workaround I would be happy to try it, but I have no problem waiting for B2 -- Jan-Erik |
Mon, Jul 28 2008 5:53 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jan-Erik,
<< Most edits are done using ASPxGridView, I did a check on timestamp and as far as I can see it's the same issue on that one as well. If there is a workaround I would be happy to try it, but I have no problem waiting for B2 >> Unfortunately, if you're not doing the edits in code, then I can't really give you a workaround. -- Tim Young Elevate Software www.elevatesoft.com |
Sat, Aug 2 2008 5:35 PM | Permanent Link |
Jan-Erik Johansen | "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:
Jan-Erik, << Most edits are done using ASPxGridView, I did a check on timestamp and as far as I can see it's the same issue on that one as well. If there is a workaround I would be happy to try it, but I have no problem waiting for B2 >> Unfortunately, if you're not doing the edits in code, then I can't really give you a workaround. -- Tim Young Elevate Software www.elevatesoft.com |
Sat, Aug 2 2008 5:41 PM | Permanent Link |
Jan-Erik Johansen | Tim,
I've tried both b2 and b3 but the issue still remains. Could you please have another look at it. I'm able to post changes or insert records but only if the date or timestamp fields are null or empty. -- Jan-Erik |
Mon, Aug 4 2008 5:47 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jan-Erik,
<< I've tried both b2 and b3 but the issue still remains. >> B2 should have corrected this issue, which was trying to set any date/time value (parameter, column, etc.) would raise a cast error). If it didn't, then it's a separate issue and I need something from you to give me an indication of where to look. Do you have any code that you could send me via email that reproduces the issue ? -- Tim Young Elevate Software www.elevatesoft.com |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Wednesday, May 15, 2024 at 08:40 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |