Re: Database for a WM5 device



With VS2003 you already have the necessary SQLCE components required - these
will be deployed to the device as required when you debug (once you add a
reference to System.Data.SqlServerCE). What specific Exception is thrown, if
you get the full details from this - error codes, message etc it will help
determine the cause.

Check your connection string - I believe the database path should be
surrounded with single quotes e.g. "Data Source='\Test.sdf'"

Peter

--
Peter Foot
Windows Embedded MVP
www.peterfoot.net | www.inthehand.com

"brianbulla@xxxxxxxxxxx" <brianbullahotmailcom@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote in message news:E92A1220-B9C9-45A5-964A-4308D99D3FBD@xxxxxxxxxxxxxxxx
Peter,

Thanks for the help. I'm still a little confused, so hopefully you can
clarify.

It sounds like I can use SQL CE on my WM5 device. Currently I only need
the
DB to reside on the device. Assuming that I have added all the proper
references and installed SQL Server CE on my desktop, should these two
lines
of code work??

dim engine as New SqlCEEngine("Data Source = test.sdf")
engine.CreateDatabase()

From everything I have read, this should create a test.sdf file on my PPC,
which I can then issue other commands against in my code. However, the
.CreateDatabase line is generating an exception and I cannot figure out
why.
I have found plenty of other posts on the WWW with this same problem, but
not
a single one has a solution for this.

Do you think it is my configuration?? Again, I am using VS.NET 2003,
CF1.1
and a WM5 device.

After downloading and running the setup for SQL CE from the Microsoft
website is there any further I need to do??

This problem is driving me nuts!!

Your help is appreciated,

Brian



"Peter Foot [MVP]" wrote:

SQL CE will work on WM5 and older Pocket PCs. However you can't create a
SQL
CE database on the desktop (without third-party tools). SQL Mobile has
tools
within VS2005 to support creating your database on the desktop, to use
SQL
Mobile you need .NETCF v2.0 so this is only an option for PPC2003 and
newer.

Peter

--
Peter Foot
Windows Embedded MVP
www.peterfoot.net | www.inthehand.com

"brianbulla@xxxxxxxxxxx"
<brianbulla@xxxxxxxxxxx@discussions.microsoft.com>
wrote in message
news:D06C5E68-7A1A-42E3-AD86-38ABAF95F386@xxxxxxxxxxxxxxxx
Hello,

I need a database for my WM5 app. I am using VS.NET 2003. I would
like
to
use ADO style access to the database.

I noticed on my old PPC 2002 device that I could upload .mdb file to
and
they would automatically be converted to .cdb. With WM5 this is no
longer
possible due to the lack of Pocket Access.

Therefore, how do I build a database for my WM5 device?? Do I need to
upgrade to VS.NET 2005??

I tried installing SQL Server CE onto my desktop and then using the
'engine.createdatabase' method to create an .sdf file, but that
generated
an
exception.

I am at a loss trying to figure this out. I thought it would be
simple.

Any help is appreciated.

Thanks,

Brian





.



Relevant Pages

  • Re: Reliably reproducing Native Exception 0xc0000005 on SQL CE 2.0
    ... SQL CE QP is not going to be able to optimize that stmt. ... >I am reliably reproducing the ExceptionCode 0xc0000005 native exception ... > SQL CE 2.0 database file ...
    (microsoft.public.sqlserver.ce)
  • Re: Database for a WM5 device
    ... You suggestion of the single quotes wasn't it. ... After doing that I am able to run my SQL CE commands in my VB.NET program ... It sounds like I can use SQL CE on my WM5 device. ... CE database on the desktop. ...
    (microsoft.public.pocketpc.developer)
  • Re: Database for a WM5 device
    ... It sounds like I can use SQL CE on my WM5 device. ... CE database on the desktop. ... I noticed on my old PPC 2002 device that I could upload .mdb file to and ...
    (microsoft.public.pocketpc.developer)
  • Re: Error Message for Logon
    ... Your web site is setup for anonymous logon, ... your connection to the database is set to use SQl Integrated Security. ... An unhandled exception occurred during the execution of the ...
    (microsoft.public.dotnet.security)
  • SQL2k5 : Login failed for user KLEOASPNET
    ... Visual Web Dev) and, MS SQL 2005 with a database with ... send a query to the database. ... An unhandled exception occurred during the ... for the SQL Server. ...
    (microsoft.public.sqlserver.server)