473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

[MOVED from Mobile]Program which reads data from an Excel file

2
Hi all,
I need to write a program in VB.Net 2003 for the pocket PC (with mobile 5),
which will read data from an Excel file, and dispay them.
I didn't succeed to create a correct connection to the Excel file.
I tried few providers, as far as i tried the JET and OLEDB components are
not suitable to use on a pocket pc program (in vb.net).
there's the code:

Dim ds As DataSet

Dim con As IDbConnection

Dim comm As IDbCommand

Dim da As System.Data.IDbDataAdapter

Try
con.ConnectionString = "Provider=MSOLAP.2;Persist Security
Info=False;Data Source=c:\tblCity.xls;Client Cache Size=25;Auto Synch
Period=10000"

comm.CommandText = "select * from [tblCity$]"

da.InsertCommand.Connection = con
da.SelectCommand = comm
da.Fill(ds)

Catch ex As Exception
...
End Try

in the line of the connection initialization - the system stops and throw
the next error:
An unhandled exception of type 'System.NullReferenceException' occurred in
SmartDeviceApplication1.exe

I would like to get any advice...
btw - those are my first steps in the .Net Framework. sorry if the question
(and my code) is not clear/weird/etc....
Thanks!
Jul 19 '07 #1
1 1390
RedSon
5,000 Expert 4TB
Unfortunately I am not a VB programmer so I will not be much help to you. But since this is a .NET program and the .NET compact framework is a subset of the available functions of a regular .NET program perhaps the .NET group can help you more.
Jul 19 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Jeff Smith | last post by:
Hi Is there a way to do partial replication of data? I'm looking at having a central back end data file which contains all the data from all users. But when each user synchronises the mobile...
4
by: Jason Jacob | last post by:
To all, I've tried to use System.IO.File.Move (srcFile, desFile); but there is an exception similar to this : The process can't access desFile because it's being used by another process I...
0
by: Michael Rich | last post by:
I am using a type lib in a project and it work great. Problem is, when I move the TLB file, VB (in vs.net 2003) does not allow me to register the moved file as a reference. I have to use the one...
1
by: Matthew Eno | last post by:
I have a problem where I'm developing some code that moves files from one place to another (on the same drive) with the destination file having a new name. What's happening is that the line of...
1
by: tobesurveyor via AccessMonster.com | last post by:
Hello all, The program I am creating takes certain files found on a Pocket PC and places them on a specific directory on a network drive. It is automated in the transfering of the files, and in...
34
by: Tom | last post by:
I'd greatly appreciate advice and code snippets on how to create a ram disk within a C/C++ program. I also need to be able to determine the free space. Thanks in advance for any help.
0
by: abhinavjainpassion | last post by:
i have DKU-5 clone cable for nokia phone how can i install it on linux or which linux is better to install that cable plz help me
2
by: xyw | last post by:
I would like to ask How I can write formatted output to a file using Windows Mobile API. using ANSI C I can write with fprintf(), but if I am opening an file with CreateFile() API, then How can I...
8
by: mohi | last post by:
hello everyone, i have a problem regarding networking apis of unix link systems ....i don know this is the best place this request but i cudnt get one .(so also suggest where to ask such...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.