Solved

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

Posted on 2008-06-11
4
268 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
4 Comments
 
LVL 22

Accepted Solution

by:
Paka earned 500 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
Many of us need to configure DHCP server(s) in their environment. We can do that simply via DHCP console on server or using MMC snap-in on each computer with Administrative Tools installed in a network. But what if we have to configure many DHCP ser…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

707 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now