Solved

is there a sample of database app for windows mobile?

Posted on 2010-09-11
5
1,168 Views
Last Modified: 2013-11-17
Salam

Can any body give me ,or link me to an example of database windows mobile .

Thank you
0
Comment
Question by:Ahmadal_najjar2003
  • 3
5 Comments
 
LVL 6

Accepted Solution

by:
FactorB earned 250 total points
Comment Utility
As per my opinion it is best to use SQLite

Download the driver and install it
http://sourceforge.net/projects/sqlite-dotnet2/

Make a database file and tables with SQLite studio
http://sqlitestudio.one.pl/index.rvt?act=download

Then simply access your data from .Net

        Dim ds1 As System.Data.DataSet = New System.Data.DataSet
        '''''' get the full application name with the path
        Dim fullPath As String=System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase
        '''''' get the path to the folder
        Dim pathOnly As String = fullPath.Substring(0, fullPath.LastIndexOf("\")) & "\"
        Dim MyConnection1 As New System.Data.SQLite.SQLiteConnection()
        '''''' assuming that database name is database.db3 and is located in the same folder as application
        MyConnection1 = New System.Data.SQLite.SQLiteConnection("Data Source=" & pathOnly & "database.db3;")
        '''''' You have a table named "table_name" and want to select everything from it        
        Dim da1 As New System.Data.SQLite.SQLiteDataAdapter("Select * From table_name", MyConnection1)
        ''''''' fill the data adapter with records        
        da1.Fill(ds1, "table_name")

That's it for class one :)

Regards,
B.
0
 
LVL 6

Expert Comment

by:FactorB
Comment Utility
I've just simplify what it took me a lot of time to find (I've tested all kinds of windows mobile i.e. pocket pc databases and SQLite just caught me :) The same database and application was working on desktop (.Net 3.5), off course with a x86 driver from the upper post.
0
 
LVL 3

Assisted Solution

by:efatihan
efatihan earned 250 total points
Comment Utility
i can tell you to use sql compact. i'am using it for long time and didn't see any problem nor compare it with other db systems. upon a time i tried to use the oracle version and couldn't even make it to work :)

just try it, here is a sample:
http://arcanecode.com/2007/04/13/sql-server-compact-edition-with-c-and-vbnet/

microsoft has a good support for it.
0
 
LVL 6

Expert Comment

by:FactorB
Comment Utility
The only thing I don't like with SQL Server Compact is when you deploy your application you need to install the server, too. With SQLite you just deploy the driver (SQLite.dll) and the Application in the same folder. Plus there is such a handy option, IN MEMORY TABLES that enables you to read the tables into ram and use them from there. Tremendous for speed. Speed is the main enemy to other embedded databases.

Regards,
B.
0
 

Author Closing Comment

by:Ahmadal_najjar2003
Comment Utility
Thanks
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 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

16 Experts available now in Live!

Get 1:1 Help Now