Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

I write an VB.Net app running on window Mobile (with MS office. But I encounter a problem is there are no OLEDB to easy connect the MS Access and retrive any data.

Can anyone help and teach me how to make connection in widow Mobile to remote MS Access database table.

Thanks
Posted
Comments
vinodkumarnie 25-Mar-13 4:37am    
Wat have you tried so far...? Can you share the code..?

1 solution

I think that you need to read this: Getting started with building Windows Mobile Solutions with Visual Studio and Windows Mobile 6 SDK [^].
Quote:
This article describes how to start to develop for Windows® phones by using the same tools that developers use for desktop development, Microsoft Visual Studio 2008, and the Windows Mobile specific Microsoft .NET Compact Framework 3.5. It also explains how to use Windows Mobile SDK Tools to extend Windows Mobile applications.
 
Share this answer
 
Comments
daniel_mak2008 26-Mar-13 0:18am    
Dear Permalink,

Thanks your suggestion. I will study it. However, I am urgent to do my Mobile VB.NET application.
Can you give some example to indicate how I can do now.
Thank you
Maciej Los 26-Mar-13 2:52am    
Did you follow the link? There are examples.
daniel_mak2008 27-Mar-13 0:36am    
Dear maciej Los,

Thanks your advice. I am looking in there, but I can't find how to make the connection between local computer's MS Access database by SqlCeConnection. I also try to write following code

Dim ceConn As SqlCeConnection = New SqlCeConnection("Data Source = C:\abc\bb.mdb")
ceConn.Open()
Dim ceCmd As SqlCeComman = ceConn.CreateCommand
cdCmd.CommandTet = ("insert into TEST ( fields_1 ) Values ( "OK")
ceCmd.ExecuteNonQuery
ceConn.Close()

When I run in above code, the error message is "The file name is not valid........."
Can you or anyone tell me how I can fix this problem ?
Thank you
Maciej Los 27-Mar-13 3:33am    
I'm not familiar with Windows CE and SQL Server compact edition...
I've read a bit more and i'm afraid you can't connect to ms access database using SqlCeConnection object and Windows Mobile. There is only possible to connect to MS SQL Compact 3.x database, but... you can always use SQL server compact edition and connect to it by Microsoft SQL Server 2005 Compact Edition Access Database Synchronizer[^], which
(...) provides a way to synchronize data between Microsoft Access database on a desktop and Microsoft SQL Server 2005 Compact Edition database on a device.
(...)
Once the desktop is setup for synchronizing, you have to make sure that there is an ActiveSync connection setup between the desktop and device. Synchronization will not be possible if there is no ActiveSync connection established. To install the sample application on the device, copy the sqlce.access.sample.PPC.wce5.armv4i.CAB file that is located at \Program Files\Microsoft SQL Server Compact Edition\v3.1\Sync\Access to the deivce and execute it. To run the sample application on a Windows Mobile 5.0 Pocket PC, NET CF 2.0 and SQL Mobile/SQL Sever Compact Edition need to be installed on the device.


Interesting forum: http://answers.microsoft.com/en-us/Search/Search?SearchTerm=ms+access&CurrentScope.ForumName=WinPhone&CurrentScope.Filter=wp6n&askingquestion=False[^]
WMDC - Windows Media Device Center[^]
daniel_mak2008 27-Mar-13 4:27am    
Thanks your reply.

It is because I don't want use synchronize method to do this. So I hope find a way similar oledb to connect MS access. Although it is not my answer, Thanks a lot

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900