connecting app in Pocket Pc emulator to local SQL server

G

Guest

Hi,

I was able to connect to the SQL server 2000 in the network using the code below.

Dim cn As SqlClient.SqlConnection
cn = New SqlClient.SqlConnection("user id=sa;password=xxx;database=MF;Server=10.0.0.16")
cn.Open()

However, I also want to continue working at home using the emulator and my local SQL server to serve as test data.
I tried to replace the string value with settings I have in my local server:

cn = New SqlClient.SqlConnection("user id=BertUser;password=hlt;database=MF;Server=BERT")

The command above always give me a "SQL server Not Found" using the emulator. Did I do something wrong?

Thanks.
Bert
 
T

Tom Krueger [MSFT]

Hi Bert,

You are having trouble connecting to Sql Server from Pocket PC Emulator. It
is working at the office, however, you can't get it to connect at home.

Sounds like you are having either a security issue or one of the parameter
values in your connection string is incorrect. I would first attempt to
connect to the database from Query Analyzer using the same user name and
password in the connection string. If this does not work, you probably have
a security issue. You will need to make sure the user is in SQL Server
Logins and that the user has access to the database. If you are able to
connect in Query Analyzer I would next create a test windows or web app
(which ever you are more familiar with) and use the SQL Connection control
to help generate and more importantly Test a connection string. Once that
is working you can copy that connection string to the Pocket PC app to use.

If you are still having troubles, please post again so we can get to the
bottom of this.

Tom Krueger
Microsoft Corporation
Program Manager
http://weblogs.asp.net/tom_krueger

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


Bert said:
Hi,

I was able to connect to the SQL server 2000 in the network using the code below.

Dim cn As SqlClient.SqlConnection
cn = New SqlClient.SqlConnection("user id=sa;password=xxx;database=MF;Server=10.0.0.16")
cn.Open()

However, I also want to continue working at home using the emulator and my
local SQL server to serve as test data.
I tried to replace the string value with settings I have in my local server:

cn = New SqlClient.SqlConnection("user id=BertUser;password=hlt;database=MF;Server=BERT")

The command above always give me a "SQL server Not Found" using the
emulator. Did I do something wrong?
 

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