"server does not exist or access denied" pocket pc

G

Guest

Hi
I've just lost the whole message so this time short:

1. Develped using VS 2005 and CF 2.0
2. Pocket PC runs Windows Mobile 5.0 and connectes to LAN via WiFi
3. Can ping SQL server using vx Util
4. Connection string copied from the desktop app and it works
5. CF framework and SQL Server Client 2.0 installed on the pocket PC
6. Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
cn = New System.Data.SqlClient.SqlConnection("Data Source=" +
txtServer.Text + ";Initial Catalog=PVI;user id=" + txtUID.Text + ";pwd=" +
txtPWD.Text)
Try
cn.Open()
Label1.Text = "Connected"
Catch ex As Data.SqlClient.SqlException
Dim errorMessages As String = ""
Dim i As Integer

For i = 0 To ex.Errors.Count - 1
errorMessages += "Index #" & i.ToString() &
ControlChars.NewLine _
& "Message: " & ex.Errors(i).Message &
ControlChars.NewLine _
& "LineNumber: " & ex.Errors(i).LineNumber &
ControlChars.NewLine _
& "Source: " & ex.Errors(i).Source &
ControlChars.NewLine _
& "Procedure: " & ex.Errors(i).Procedure &
ControlChars.NewLine
Next i
MsgBox("Could Not Connect" + vbCrLf + errorMessages)
Finally
cn.Close()
End Try

End Sub

Any ideas on how to troblehooot this
 
G

Guest

I am using IP address. I've added text box so I can try different servers (IP
addresses) on my LAN. No luck.

I've tried the same in emulator (first I've downloaded Virtual Machine
Network driver) and enable network card. The emulator has aquired the IP
address from my router, I can ping SQL server from the emulator and I can
ping emulator from my SQL server but no connection via program. Same error
message.

Went back to pocket PC. I can ping SQL server from pocket PC and I can ping
pocket pc from sql server. No connection via program.
 
G

Guest

Mu pocket pc connects to LAN, same as any other desktop. I don't think that
there is a firewall involved. I any case i have disabled Windows firewall and
no change.

What I am looking for is some kind of a tool on the SQL server that can
inform me that there is an incoming connection attempt but it will be
rejected or there is no attemprted connection whatsoever. SQL server does not
exist and Access denied are two completly different causes producing the same
error.
 

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