connect Mobile 5.0 to SQL Server

  • Thread starter Thread starter David de Passos
  • Start date Start date
D

David de Passos

Hi!

I have a Pocket PC aplicattion developed in VS 2003, I have converted in VS
2005 but I get a error.
So, I have create a new Pocket PC aplication from Vs 2005, with the same
code and I get the same error:
"SQL Server does not exist or access denied."
The program work well but when try myConnection.Open() I get the exception
error.

There is my code:

Imports System.Data.SqlClient

Module RCMobile

Dim myConnection As New SqlConnection

Dim ConnGestao As String

Sub Main()

Try

MsgBox("ola")

'ConnGestao = "Password=aaa;User ID=teste;database='" & BaseDados &
"';server='" & Servidor & "' ;Connect Timeout=10"

ConnGestao = "Persist Security Info=False;Integrated Security=False;server="
& Servidor & ";initial catalog=" & BaseDados & ";User ID=teste; Password =
aaa;Connect Timeout=10"

myConnection.ConnectionString = ConnGestao

myConnection.Open()

myConnection.Close()

Catch ex As SqlException

MsgBox(ex.Message & Err.Description)

Application.Exit()

End Try

End Sub

End Module
 
This sounds like an installation of sql that didn't work right or a
config setting incorrect. Is there a way to verify that SQL works
independent of your program.
 
´The SQL server works fine, with windows aplication and Mobile aplication
2003, but with Mobile 5.0 2005 doesn´t work
 
David said:
´The SQL server works fine, with windows aplication and Mobile aplication
2003, but with Mobile 5.0 2005 doesn´t work

David,

In addition to changing the target platform to Windows Mobile 5.0, have
you also done an "Upgrade" to .NET CF 2.0?

FYI, you need .NET CF 1.0 to work with SQL CE 2.0 and .NET CF 2.0 to
work with SQL Mobile 2005.
 
Yes I have already upgrade to .NET CF 2.0

Nino Benvenuti said:
David,

In addition to changing the target platform to Windows Mobile 5.0, have
you also done an "Upgrade" to .NET CF 2.0?

FYI, you need .NET CF 1.0 to work with SQL CE 2.0 and .NET CF 2.0 to work
with SQL Mobile 2005.
 
Back
Top