Computer Hope

Software => Computer programming => Topic started by: JonnyMX on August 31, 2004, 05:02:17 AM

Title: Visual studio data formats
Post by: JonnyMX on August 31, 2004, 05:02:17 AM
Can anyone offer any advice?
I am building a Windows application using VB.NET in Visual Studio. A MS Access database is represented in a datagrid. One of the columns in the database table is a time, with the format of short time, which works fine in Access. However, when I fill the datagrid the time is shown as a date despite the fact that the dataset schema is also set to time for this column.
In addition, the datagrid rearranges all the columns into alphabetical order.
It's doing my head in!
Title: Re: Visual studio data formats
Post by: Joleen on August 31, 2004, 09:30:02 AM
The time could probably just be a format issue.
Title: Re: Visual studio data formats
Post by: JonnyMX on August 31, 2004, 10:21:11 AM
It is a format issue, that's kind of the point.
I don't see what is converting the format to a date when it's set up to be a time at each end!
It isn't even a valid date, such as the default. It is usually 13/11/1788 or some such.
Help...
Title: Re: Visual studio data formats
Post by: Joleen on August 31, 2004, 10:57:27 AM
I guess I was trying to point out that you could use the Format() and make it a time type.

Can you post the piece of code that you're dealing with?