PC Review


Reply
Thread Tools Rate Thread

Can't connect to sql 2000 from WinCe 4.1

 
 
New Member
Join Date: Jun 2005
Posts: 1
 
      10th Jun 2005
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?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I can't connect visual studio 2005 to my wince 5.0 device =?Utf-8?B?R2VvZmZyZXkgQ2FsbGFnaGFu?= Microsoft Dot NET Compact Framework 2 10th May 2007 10:09 AM
How connect usb-camera with dotnet or wince 4.2? Andrey Kaplun Microsoft Dot NET Compact Framework 3 3rd Jan 2006 07:40 PM
Cannot connect to WinCe device with Vs2003 Ide =?Utf-8?B?Sm9obiBPbGJlcnQ=?= Microsoft Dot NET Compact Framework 1 20th Oct 2005 09:18 PM
Can't connect to sql 2000 from WinCe 4.1 =?Utf-8?B?YWx1cg==?= Microsoft Dot NET Compact Framework 2 16th Jun 2005 11:31 AM
WinCe.Net connect to SQL Server 7 ? Simon Microsoft Dot NET Compact Framework 2 3rd May 2004 06:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:05 AM.