What in the heck am I doing wrong! I am building a pocket pc application. I have a form the consists of: ListBox1 and Button1. I would like to fill the list box with the CompanyName values from the NorthWind database. I will trigger the ReadSqlDataReader in the click event of Button1. I keep getting an error from the dr = cmd.ExecuteReader code. I am using the 2002 emulator. I have been at this for hours without any result. I know my connection string is correct.
Public Sub ReadSqlDataReader()
Dim cn As SqlClient.SqlConnection
Dim cmd As SqlClient.SqlCommand
Dim dr As SqlClient.SqlDataReader
cn = New System.Data.SqlClient.SqlConnection("user id=sa;password=admin;database=Northwind;server=192.168.11.118")
cmd = New SqlClient.SqlCommand
cmd.CommandText = "Select * from Customers"
cmd.Connection = cn
dr = cmd.ExecuteReader()
Catch ex As System.Data.SqlClient.SqlException