WinCE emulator and SqlServer

Z

Zanna

Hi,

I've a question for you :)

Why when I try do connecto to an SqlServer DB with a device WinCE 4.2 all
works fine and if I run the same project on the emultator there is no way to
open the connection?
It says that the SQL server does not exists or I havn't the rights to access
it :(

Someone can help me?

Thanks!
 
D

Darren Shaffer

Zanna,

Compact Framework apps can certainly access SQL CE in an emulator.
Here are a few things to check:

1. make sure you don't have your sqlce database locked - a common
problem is developers running SQL Query Analyzer to look at their
SQL CE database (sdf file) and instead of exiting SQL Query
Analyzer, they minimize it. This keeps your database locked and
your app cannot open a connection to it. Be sure to use the Tools-->Exit
option in SQL CE Query Analyzer.

2. make sure SQL CE is correctly installed in the emulator - hard reset
your
emulator and then redeploy from VS.Net2003. Make sure you see
SQL CE being installed in the emulator during deployment.

3. make sure a previous/other instance of your CF app isn't holding a lock
on the database (Check settings-->memory-->running programs and
terminate anything that might be using SQL CE)

Hope that helps,
Darren
 
A

Alex Feinman [MVP]

Try referring to SQL server by IP address. Make sure you can ping it from
the emulator command prompt. The way emulator provides TCP pass-through
makes name resolution work slightly differently then on PC itself or a
device connected to the network using a network card.
 
Z

Zanna

Try referring to SQL server by IP address. Make sure you can ping it from
the emulator command prompt.

From the prompt I can ping the server by name, by IP and by the loopback IP,
but I still get the same message :(

The SQL server is an MSDE installed on the same machine.
The PC is a stand-alone PC with a loopback card.
 

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