不支持平台 [英] platform not supported

查看:105
本文介绍了不支持平台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我已经创建了一个小型Windows应用程序,并从Windows Mobile应用程序连接了sql server2005.
建立连接时,我不支持该平台.

hi all, i have created small windows application and connecting sql server 2005 from my windows mobile application
while establish the connection i am getting that platform not supported.

System.PlatformNotSupportedException was unhandled
  Message="PlatformNotSupportedException"
  StackTrace:
    at System.Text.Encoding.GetDataItem()
    at System.Text.CodePageEncoding..ctor()
    at System.Text.Encoding.GetEncoding()
    at System.Data.SqlClient.TdsParser.ProcessEnvChange()
    at System.Data.SqlClient.TdsParser.Run()
    at System.Data.SqlClient.TdsParser.Run()
    at System.Data.SqlClient.SqlInternalConnection.Login()
    at System.Data.SqlClient.SqlInternalConnection.OpenAndLogin()
    at System.Data.SqlClient.SqlInternalConnection..ctor()
    at System.Data.SqlClient.SqlConnection.Open()
    at DeviceApplication1.Form1.button1_Click()
    at System.Windows.Forms.Control.OnClick()
    at System.Windows.Forms.Button.OnClick()
    at System.Windows.Forms.ButtonBase.WnProc()
    at System.Windows.Forms.Control._InternalWnProc()
    at Microsoft.AGL.Forms.EVL.EnterMainLoop()
    at System.Windows.Forms.Application.Run()
    at DeviceApplication1.Program.Main()



这是我的代码在这里




and this is my code here


SqlConnection conn = null;
 string conString;

conString ="Data Source=192.168.100.11;Initial Catalog=PDA;Integrated Security=SSPI;User ID=mydomain\\usewrid;Password=mypassword";

conn = new SqlConnection(conString);
conn.Open();



我在conn.open()的这一行中遇到错误;


如何解决此错误.



i am getting error in this line of conn.open();


how to fix this error.

推荐答案

正在使用的WinCE/Windows Mobile设备不支持数据库的排序规则,即它缺少代码页从构建.您应该能够通过将排序规则更改为服务器端的其他排序规则(例如SQL Latin或类似名称)来进行测试.

我看到了与WinCE 6.0设备相同的情况,其中成功连接到具有"Latin1_General_CI_AI"排序规则的数据库,但连接至具有"Romanian_CI_AS"的数据库失败.通过获取WinCE映像的更新最终解决了该问题,其中添加了所需的代码页1520.另一种选择是将数据库排序规则更改为手持设备支持的内容.
The collation of your database is not supported on the WinCE/Windows Mobile device you are using, i.e. it''s missing the codepage from the build. You should be able to test it by changing to collation to something else on server side, for example SQL Latin or similar.

I saw the same situation with a WinCE 6.0 device where connecting to a DB with "Latin1_General_CI_AI"-collation succeeded but connecting to a DB with "Romanian_CI_AS" failed. The problem was eventually solved by acquiring an update for the WinCE image where the required codepage 1520 was added. Another option is just to change the database collation to something that is supported on your handheld device.


可能是因为您尝试连接到错误的平台,必须连接到
SqlCE [ ^ ].用于紧凑型框架.

谢谢
--RA
May be you are trying to connect to the wrong flatform, you have to connect to the
SqlCE[^]. for Compact Framwork.

Thanks
--RA


这篇关于不支持平台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆