G
Guest
I am trying to connect to a SQL Server database from my Symbol MC50 handheld
running WM 2003.
I am able to ping the server from my handheld, and yet no matter what I try
I get the error {"Specified SQL server not found: 192.168.2.11\WASPDB"}
I have written a test program that should work on either .NET framwork or
the .NET CF framework. The same code works just fine from my desktop, but
when I run this code from the handheld I get the {Specified SQL server not
found message.}
Sample code below, password changed to protect the innocent.
//////////////////////////////////////////////////////////////////////////////////////
Imports System.Data.SqlClient
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim cs As String = "Data Source=192.168.2.11\WASPDB;Initial
Catalog=WaspTrackInventory;User Id=sa;Password=xxxxxxx;persist security
info=False"
Dim dbConn As SqlConnection = New SqlConnection(cs)
Dim da As SqlDataAdapter = New SqlDataAdapter("SELECT * FROM item",
dbConn)
Dim myTable As DataTable = New DataTable
dbConn.Open()
da.Fill(myTable)
TextBox1.Text() = "hello"
TextBox2.Text() = "Count = " + myTable.Rows.Count.ToString()
dbConn.Close()
da.Dispose()
End Sub
End Class
//////////////////////////////////////////////////////////////////////////////////////
running WM 2003.
I am able to ping the server from my handheld, and yet no matter what I try
I get the error {"Specified SQL server not found: 192.168.2.11\WASPDB"}
I have written a test program that should work on either .NET framwork or
the .NET CF framework. The same code works just fine from my desktop, but
when I run this code from the handheld I get the {Specified SQL server not
found message.}
Sample code below, password changed to protect the innocent.
//////////////////////////////////////////////////////////////////////////////////////
Imports System.Data.SqlClient
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim cs As String = "Data Source=192.168.2.11\WASPDB;Initial
Catalog=WaspTrackInventory;User Id=sa;Password=xxxxxxx;persist security
info=False"
Dim dbConn As SqlConnection = New SqlConnection(cs)
Dim da As SqlDataAdapter = New SqlDataAdapter("SELECT * FROM item",
dbConn)
Dim myTable As DataTable = New DataTable
dbConn.Open()
da.Fill(myTable)
TextBox1.Text() = "hello"
TextBox2.Text() = "Count = " + myTable.Rows.Count.ToString()
dbConn.Close()
da.Dispose()
End Sub
End Class
//////////////////////////////////////////////////////////////////////////////////////