How To Use Databse On Pocket PC ?
I'm newbie for pocket pc application and i have problems for the database in Pocket PC App ?
How to Connect the SQL CE in VB.NET 2003 Pocket PC ?
I has been created the application with VB.NET 2003 Pocket PC, but it not connect to Database. For the database i use the ARRAY Data only, but it not dinamis.
Please halp me. Step by step to User SQL CE Database ?
thanks
Re: How To Use Databse On Pocket PC ?
heres a link to the comact framework tutorials
http://samples.gotdotnet.com/quickst...pactFramework/
this shows samples of using sqlce in vs2003
Re: How To Use Databse On Pocket PC ?
ok. i has been try for your link.
but i have problem, when installaion on pocket pc ?
my error like this:
This Application requies newer version of the Microsoft .NET Compact Framework then the version installed on this device
and my code on program like this :
VB Code:
Function createDB() As Boolean
Dim pathDir As String = "\My Documents\Personal\Contacts.sdf"
Dim status As Boolean = False
Try
' Delete the SQL Mobile 2005 Database file
If File.Exists(pathDir) = False Then
status = True
File.Delete(pathDir)
' Create a new database
Dim engine As New SqlCeEngine("Data Source = \My Documents\Personal\Contacts.sdf")
engine.CreateDatabase()
End If
' Create and open connection. The SqlCeResultSet requires the
' connection to be open to perform various functions
conn = New SqlCeConnection("Data Source = \My Documents\Personal\Contacts.sdf")
conn.Open()
If status Then
' Create Command
cmd = conn.CreateCommand()
cmd.CommandText = "CREATE TABLE Contact (ID INT, First NVARCHAR(20), Last NVARCHAR(30), Phone NVARCHAR(20), EntryDate DATETIME)"
cmd.ExecuteNonQuery()
End If
' Create ResultSet
cmd.CommandText = "SELECT * FROM Contact"
rs = cmd.ExecuteResultSet(ResultSetOptions.Updatable Or ResultSetOptions.Scrollable)
'' Bind the result set to the DataGrid
ContactDataGrid.DataSource = rs.ResultSetView
' Add records for demonstration purposes
Dim i As Integer
For i = 0 To 9
Dim idxStr As String = i.ToString()
AddRecord(rs, "First" & idxStr, "Last" & idxStr, "555-100" & idxStr)
Next i
Return True
Catch ex As Exception
Return False
MessageBox.Show("Error: " & ex.Message)
End Try
End Function
1. what must i do before i intall my Mobile application to pocket pc ?
Re: How To Use Databse On Pocket PC ?
Is that installing on your device, or trying to run it on your device using VS2003?
What version is installed on your PPC? Run cfgacutil.exe from the windows folder on your PPC - that will tell you which version is installed on your device.
Re: How To Use Databse On Pocket PC ?
I has been try on Emulator use the sql ce programming and it success.
but when i try to start my program on pocket pc it not success, becouse my pocket pc there is not SQL CE software.
I has download the SQL CE for mobile but that file .msi Extention not .exe. my pocket pc is not detection the .msi extention, so i can't install sql ce on my pocket pc, and i don't know that the file is true (sql ce or not). where i can download the sql ce for mobile not .msi file ?
my pocket pc version is 2003
Re: How To Use Databse On Pocket PC ?
Hi,
when you deploy your program using VS2003, it will deploy SqlCe for you.
Otherwise, you need sqlce.wce4.armv4.cab copied to your device, and then click on it to install.
The easiest way to do it is run VS2003, attach your device, and then with the targe set to the device, click on f5 to run
Pete
Re: How To Use Databse On Pocket PC ?
True or False: As far as distributing any PDA applications, I will need to include this sqlce.wce4.armv4.cab with my application.
If True, where do I obtain this file?
Re: How To Use Databse On Pocket PC ?
Wherever you installed Microsoft Visual Studio
eg:
C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE\wce400\armv4
here you will find the sqlce.wce4.armv4.cab, also you may wish to distribute the sqlce.dev.wce4.armv4.CAB as it gives better error messages to the user should there be a database exception.
I also distribute the System_SR_enu.cab found in
C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE\Diagnostics
Re: How To Use Databse On Pocket PC ?
Thanks for the directories. (I use VS2005, but I'm sure the paths are very similar). Now how to wrap all these files up into a nice, user-friendly installation package...?
Re: How To Use Databse On Pocket PC ?
thank for your answer.
now i has install the sql ce to ppc.