What sql connection string to use from Win CE 5.0 application?


G

Guest

Hi all,

I've been trying for a few days now (to do something trivial as) to get my
win ce application to connect to a SQL2000 Database (local), but I have not
succeeded. Here is the code below:


Dim objcn As New SqlConnection("Server=192.168.21.110\SQL2000,1433;Initial
Catalog=Drifters;User ID=gladiususer;Password=gladius;Integrated
Security=SSPI")
Dim objcomm As New SqlCommand("Select * from tblCONSIGNEES", objcn)
Dim objreader As SqlDataReader

Try
objcn.Open()
objreader = objcomm.ExecuteReader
While objreader.Read
'reads data
End While
Catch ex1 As PlatformNotSupportedException
MessageBox.Show(ex1.Message.ToString)
Catch ex As SqlException
MessageBox.Show(ex.Message.ToString)
End Try

I cannot connect to SQL2000 when I use the WinCE emulator, or WinCE device
or Pocket PC 2003 SE Emulator. However if I try the Pocket PC 2002 Emulator,
every works!!!!

I've try all sorts of things from different forms, but nothing seems to
work. I've even tried the below points also.

1. Checked that the SQL2000 is running is Domain\username account and not
local system account
2. Send the user ID as Domain\user ID form

Note: if I remove the Integrated Security from the connection string I get a
"PlatformNotSupportedException". With the Integrated Security in I get the
following error "Login failed for user '(null)'. Reason: Not associated with
a trusted SQL Server connection." My SQL Server Authentication mode is Mix.

Thanks
 
Ad

Advertisements


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