Hello all,
I am sorry for bothering you with my probably low level question.
I would like to develop a very very very simple application which will connect the MS SQL SERVER in my notebook and will be run at hand terminal-with windows mobile 6.
Here is the code which i used :
Dim strSQL As [String] = "SELECT COUNT(studentid) AS totalp from Students where gender='m' "
' Dim Conn As New SqlConnection("Data Source=10.0.0.4\MUSTAFASQL2;Initial Catalog=MYDBX;User ID=TEACHERA") <<< i used this too,
' Dim Conn As New SqlConnection("Data Source=10.0.0.4:1433\MUSTAFASQL2;Initial Catalog=MYDBX;User ID=TEACHERA;") <<< and also tried this
Dim conn As New SqlConnection("Data Source=MUSTAFA\MUSTAFASQL2;Initial Catalog=MYDBX;User ID=TEACHERA;")
Conn.Open() *<<<<<<<<< crashes here with this error : "Specified SQL server not found : MUSTAFA\MUSTAFASQL2"*
Dim cmd As New SqlCommand(strSQL, Conn)
Dim musreader As SqlDataReader = cmd.ExecuteReader
While musreader.Read
total.Text = musreader.Item("totalp").ToString
End While
Conn.Close()
on button click.
Some details :
Device : Windows Mobile 6.1 classic
Local : SqlExpress and i can reach from many computers, i mean there is no problem accessing remotely to my SQL Server.
Please help me, all helps are appreciated. Thanks a lot. Please let me know if you need to know more details for help...