Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dates Not Showing In DataSet
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
01451290
Message ID:
01451299
Vues:
36
>>>I posted on this yesterday, and only Michel responded. However I am behind schedule on this and I just don't have the time to convert his VB classs to C#, then debug//test, all in the hopes it might solve this.
>>>
>>>I'm reading an Excel file into a dataset. The entire file comes into the DS with one exception. There are multiple date columns. The first
>>>date column comes in as DateTime. No problem there. All remaining date columns are empty. When I open the file as a CSV, the
>>>other date columns look like dates. I thought I would import the CSV in, but there are commas in the data.
>>>
>>>I have no idea why this is happening. Anyone seen this before?
>>
>>Does your excel file have a bunch of blank dates in the first rows in the columns that are not importing?
>
>yes

I'm not sure if this helps or not, but SQL Server has had an issue when importing from Excel where columns that should be Dates would come out as varchar because SQL samples data in the first (some number as default) rows and checks data types. If fields were blank you'd get a string even if the column had 95% valid dates.

Options were to load the first few rows with dates, or there was a registry change that could increase the default number of rows sampled (I've set it to 1000000 on a couple of servers).

This may be handled the same way be .NET.

I can't dig out the KB on it right at the minute..
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform