CE .NET 4.1- SQL Server - PlatformNotSupportedException

  • Thread starter Frederic Villeneuve
  • Start date

F

Frederic Villeneuve

Hi, I'm trying to connected to MS SQL Server 2000 (MSDE) with a
touchscreen computer using Windows CE .NET 4.1 but I always receive
this error : PlatformNotSupportedException. Here is a copy of my
code. The connection is successful with CE .NET 4.2 and the visual
studio emulator but with CE 4.1 the connection failed.

There is an update or something I can do to use this code with CE 4.1
?

Thanks
Frederic


Dim strConnectionString As String
strConnectionString = "Integrated Security=false;user
id=sa;password=toto;database=adptest;server=P3000;"

Dim myConnection As SqlConnection
myConnection = New SqlConnection(strConnectionString)
myConnection.Open()

Dim sqlCommand As System.Data.SqlClient.SqlCommand
Dim sqlDataAdapter As System.Data.SqlClient.SqlDataAdapter
Dim ds As System.Data.DataSet
ds = New DataSet
Dim strSQLQuery As String

strSQLQuery = "SELECT * FROM Table1"
sqlCommand = New SqlCommand(strSQLQuery, myConnection)
sqlDataAdapter = New SqlDataAdapter(sqlCommand)

sqlDataAdapter.MissingSchemaAction =
system.Data.MissingSchemaAction.AddWithKey
sqlDataAdapter.Fill(ds, "Table1")

Me.DataGrid1.DataSource = ds.Tables("Table1")
 
Ad

Advertisements

P

Paul G. Tobey [eMVP]

Hmmm. According to the FAQ, .NET CF is supported on CE.NET 4.1 and later.
There's a reasonable chance, though, that something which the CF depends on
is missing from the 4.1-based device (because the device OEM didn't put it
on there). Is the .NET CF in ROM on that device (I doubt it)? If so, it
should work, even if you install a later version of .NET CF into the
device's filesystem. If not, there's a pretty good chance that something
which is needed is missing...

According to PB 4.2, the OS Dependencies for .NET Compact Framework consists
of:

C++ Exception Handling
Cryptography Services (Crypto API 1.1) with High Encryption Provider
Windows Internet Services

Paul T.
 
Ad

Advertisements

I

Ilya Tumanov [MS]

Most common reason for that is an attempt to use unsupported locale.
That might happen with SQL 2000 if you have strings with locale unsupported
on this specific device in your database.
To make it work you'd need a properly localized device.

To make sure that's the case, please provide stack trace from the debugger.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 

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