?
Solved

Some date fields are wrongly read as null from excel spreadsheet using Microsoft.Jet.OLEDB.4.0

Posted on 2008-06-11
4
Medium Priority
?
280 Views
Last Modified: 2010-04-18
       Dim ConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"""

        Dim sqlStatement As String = "SELECT * FROM [" + ExcelFileName + "]"
        Dim con As New OleDbConnection
        Try


            dap = New OleDbDataAdapter( _
                      sqlStatement, _
                        con)
            dst = New DataSet()
            dap.Fill(dst)
Some date fileds are filled as null even though they have valid dates,  Is it something to do with date format vs. numeric format?

How to fix it?
0
Comment
Question by:akulas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 22

Accepted Solution

by:
Paka earned 2000 total points
ID: 21762804
To troubleshoot this one, you'll need to comment out your exception handing to see how the nulls are being populated.  Do you have more code to view?
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This may not be a text book method to resolve VSS backup issues but it seemed to have worked on few of the Windows 2003 servers we had issues while performing a Volume Shadow Copy backup. If you have issues while performing a shadow copy backup usin…
Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question