Getting Started with sql for my pocket pc...

D

dwhittenburg

Currently, I am using xml files for my data storage. This was just
temporary so that I could get some functionality written for a prototype.
But now I want to move to storing my data in the sql database for my pocket
pc.

Does anyone have a tutorial or a getting started guide for where I need to
start? What do I need to install on the pocket pc, ect.? What files need
to be on the pocket pc and where?

In my vb.net CF app I tried to reference System.Data.SqlServerCe that I had
seen in some tutorials. However I know that I'm missing the setting up of
the sql on the pocket pc. When I try to run code like:
If Not System.IO.File.Exists("\my documents\delphip.sdf") Then

Dim en As New SqlCeEngine("data source =\my documents\delphip.sdf")

en.CreateDatabase()

End If

I get "TypeLoadException"...

I'm still searching, but any help would be appreciated.
Thanks.
 
D

dwhittenburg

ok. I think I'm getting lost even more...
I tried to use
http://asia.cnet.com/builder/program/windows/0,39009376,39172017,00.htm
as a guide. I did NOT install eMbedded Visual Tools v.3.0 -- 2002 Edition
NOR Microsoft Pocket PC 2002 SDK because I'm using vb.net compact framework
to develop my app. I did install Microsoft SQL Server CE v.2.0.

When trying to run any of the .dll on my pocket pc after I moved them over I
get an error 'isqlw20' is not a valid Pocket PC application.

Any help? Sorry if this is so newbish...
 
I

Ilya Tumanov [MS]

If you have VS 2003, you don't need to install anything on to your PC to
use SQL CE.

Here's what you need to do:

1. Add a reference to System.Data.SqlServerCe.dll and
System.Data.Common.dll to your NETCF VB.Net project.
2. Add "Imports System.Data.SqlServerCe" and "Imports System.Data.Common"
to your source code.
3. Write some code (no designers, sorry) which would use SQL CE.
Please see
http://samples.gotdotnet.com/quickstart/CompactFramework/doc/sqlcedbcreate.a
spx
It shows how to do basic things like creating the database, adding tables
and inserting rows.

VS should deploy SQL CE CAB file on to your device. You can also install it
manually, it's located (for PPC2003) in
"C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows
CE\wce400\armv4\sqlce.wce4.armv4.CAB".
(you will need to choose correct file to match OS version and CPU of your
device).

You can also install sqlce.dev.wce4.armv4.CAB which contains SQL CE Query
analyzer utility for PPC.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
D

dwhittenburg

Thank you Ilya...

I had been to the gotdotnet page before and tried some of those things, but
they did not work.
I believe they didn't work because VS wasn't deploying the sql ce cab to my
device.

Manually moving the cab
"C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows
CE\wce400\armv4\sqlce.wce4.armv4.CAB"
over to My Device and reran my application and it now works.

Maybe there was something not self-installing in my program to the Pocket Pc
from .NET? I don't know. I had the includes, it was just not
self-installing.

Hopefully this will get me moving further. Thanks for you help.

Also, how do most people do deployments to the device? I have been just
building my app and copying the needed files over to the correct directory
on my pocket pc. This may be the reason I didn't get the cab installed onto
my device?



"Ilya Tumanov [MS]" said:
If you have VS 2003, you don't need to install anything on to your PC to
use SQL CE.

Here's what you need to do:

1. Add a reference to System.Data.SqlServerCe.dll and
System.Data.Common.dll to your NETCF VB.Net project.
2. Add "Imports System.Data.SqlServerCe" and "Imports System.Data.Common"
to your source code.
3. Write some code (no designers, sorry) which would use SQL CE.
Please see
http://samples.gotdotnet.com/quickstart/CompactFramework/doc/sqlcedbcreate.a
spx
It shows how to do basic things like creating the database, adding tables
and inserting rows.

VS should deploy SQL CE CAB file on to your device. You can also install
it
manually, it's located (for PPC2003) in
"C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows
CE\wce400\armv4\sqlce.wce4.armv4.CAB".
(you will need to choose correct file to match OS version and CPU of your
device).

You can also install sqlce.dev.wce4.armv4.CAB which contains SQL CE Query
analyzer utility for PPC.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no
rights.

--------------------
From: "dwhittenburg" <[email protected]>
References: <[email protected]>
Subject: Re: Getting Started with sql for my pocket pc...
Date: Fri, 10 Dec 2004 16:44:14 -0500
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: nat.greenwaynet.com 216.248.128.214
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12
phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.compactframework:66721
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

ok. I think I'm getting lost even more...
I tried to use
http://asia.cnet.com/builder/program/windows/0,39009376,39172017,00.htm
as a guide. I did NOT install eMbedded Visual Tools v.3.0 -- 2002 Edition
NOR Microsoft Pocket PC 2002 SDK because I'm using vb.net compact framework
to develop my app. I did install Microsoft SQL Server CE v.2.0.

When trying to run any of the .dll on my pocket pc after I moved them over I
get an error 'isqlw20' is not a valid Pocket PC application.

Any help? Sorry if this is so newbish...
 
I

Ilya Tumanov [MS]

Yes, that's probably the reason - you never used VS deployment.
VS deploys the application and all needed CABs as soon as you hit F5.
No need to copy files to the device manually. Device should be connected
via Active Sync.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
From: "dwhittenburg" <[email protected]>
References: <[email protected]>
Subject: Re: Getting Started with sql for my pocket pc...
Date: Mon, 13 Dec 2004 15:43:59 -0500
Lines: 137
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: nat.greenwaynet.com 216.248.128.214
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12
.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.compactframework:66836
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

Thank you Ilya...

I had been to the gotdotnet page before and tried some of those things, but
they did not work.
I believe they didn't work because VS wasn't deploying the sql ce cab to my
device.

Manually moving the cab
"C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows
CE\wce400\armv4\sqlce.wce4.armv4.CAB"
over to My Device and reran my application and it now works.

Maybe there was something not self-installing in my program to the Pocket Pc
from .NET? I don't know. I had the includes, it was just not
self-installing.

Hopefully this will get me moving further. Thanks for you help.

Also, how do most people do deployments to the device? I have been just
building my app and copying the needed files over to the correct directory
on my pocket pc. This may be the reason I didn't get the cab installed onto
my device?



"Ilya Tumanov [MS]" said:
If you have VS 2003, you don't need to install anything on to your PC to
use SQL CE.

Here's what you need to do:

1. Add a reference to System.Data.SqlServerCe.dll and
System.Data.Common.dll to your NETCF VB.Net project.
2. Add "Imports System.Data.SqlServerCe" and "Imports System.Data.Common"
to your source code.
3. Write some code (no designers, sorry) which would use SQL CE.
Please see
http://samples.gotdotnet.com/quickstart/CompactFramework/doc/sqlcedbcreate.a
spx
It shows how to do basic things like creating the database, adding tables
and inserting rows.

VS should deploy SQL CE CAB file on to your device. You can also install
it
manually, it's located (for PPC2003) in
"C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows
CE\wce400\armv4\sqlce.wce4.armv4.CAB".
(you will need to choose correct file to match OS version and CPU of your
device).

You can also install sqlce.dev.wce4.armv4.CAB which contains SQL CE Query
analyzer utility for PPC.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no
rights.

--------------------
From: "dwhittenburg" <[email protected]>
References: <[email protected]>
Subject: Re: Getting Started with sql for my pocket pc...
Date: Fri, 10 Dec 2004 16:44:14 -0500
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: nat.greenwaynet.com 216.248.128.214
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12
phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.compactframework:66721
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

ok. I think I'm getting lost even more...
I tried to use
http://asia.cnet.com/builder/program/windows/0,39009376,39172017,00.htm
as a guide. I did NOT install eMbedded Visual Tools v.3.0 -- 2002 Edition
NOR Microsoft Pocket PC 2002 SDK because I'm using vb.net compact framework
to develop my app. I did install Microsoft SQL Server CE v.2.0.

When trying to run any of the .dll on my pocket pc after I moved them over I
get an error 'isqlw20' is not a valid Pocket PC application.

Any help? Sorry if this is so newbish...


Currently, I am using xml files for my data storage. This was just
temporary so that I could get some functionality written for a prototype.
But now I want to move to storing my data in the sql database for my
pocket pc.

Does anyone have a tutorial or a getting started guide for where I
need
to
start? What do I need to install on the pocket pc, ect.? What files need
to be on the pocket pc and where?

In my vb.net CF app I tried to reference System.Data.SqlServerCe that I
had seen in some tutorials. However I know that I'm missing the setting
up of the sql on the pocket pc. When I try to run code like:
If Not System.IO.File.Exists("\my documents\delphip.sdf") Then

Dim en As New SqlCeEngine("data source =\my documents\delphip.sdf")

en.CreateDatabase()

End If

I get "TypeLoadException"...

I'm still searching, but any help would be appreciated.
Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top