Windows XP Can't connect to sql 2000 from WinCe 4.1

Joined
Jun 10, 2005
Messages
1
Reaction score
0
I have device Symbol MK1000 with wince 4.1 and sql 2000 on desktop.
I need get some data from sql 2000.
Where is class.
Imports System.Data
Imports System.Data.SqlClient

Public Class Sql
Public Function GetPublishersDS() As DataSet
Dim ds As New DataSet
Dim strCn As String = "user id=test;Password=test;workstation id=COMP;integrated security=SSPI;data source=11.0.3.76;persist security info=False;initial catalog=pubs"
Try
Dim sqlConn As New SqlConnection(strCn)
sqlConn.Open()
Dim sqlDA As New SqlDataAdapter("SELECT * FROM authors", sqlConn)
sqlDA.Fill(ds)
sqlConn.Close()
Return ds
Catch ex As Exception
ErrTrap(ex)
End Try
End Function

Public Function GetPublishersDS1() As DataSet
Dim ds As New DataSet
Dim strCn As String = "Server=11.0.3.76;Database=pubs;" & _
"Integrated Security=SSPI;UID=sa;Password=sa"
Dim str1 As String
Try
Dim sqlConn As New SqlConnection(strCn)
sqlConn.Open()

Dim sqlDA As New SqlDataAdapter("SELECT * FROM authors", sqlConn)

sqlDA.Fill(ds)
sqlConn.Close()

Return ds
Catch ex As SqlException
Dim e As SqlClient.SqlError
For Each e In ex.Errors
str1 = str1 & vbCrLf & e.Message
Next
MsgBox(str1)
Catch ex As Exception
ErrTrap(ex)
End Try
End Function

Public Function GetPublishersDS2() As DataSet
Dim ds As New DataSet
Dim strCn As String

strCn = "data source=11.0.3.76;" & _
"initial catalog=pubs;" & _
"user id=sa;" & _
"pwd=sa;" & _
"workstation id=COMP;" & _
"packet size=4096;" & _
"persist security info=False;"
Dim str1 As String
Try
Dim sqlConn As New SqlConnection(strCn)
sqlConn.Open()

Dim sqlDA As New SqlDataAdapter("SELECT * FROM authors", sqlConn)

sqlDA.Fill(ds)
sqlConn.Close()

Return ds
Catch ex As SqlException
Dim e As SqlClient.SqlError
For Each e In ex.Errors
str1 = str1 & vbCrLf & e.Message
Next
MsgBox(str1)
Catch ex As Exception
ErrTrap(ex)
End Try
End Function
End Class

I call methods from form on emulator and real device, but get
PlatformNotSupportedException.
The same code work fine on PocketPC.!!!
What to do?
 

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