0

我正在尝试通过 Visual Studio 2005 中的 Pocket PC 项目连接到 SQL Server 2005。但我不能。

当我尝试通过 Windows 窗体应用程序连接时,一切正常。但在 PocketPc 应用程序中我无法连接。我认为这是关于连接字符串。这是字符串;

connectionStr = @"Data Source=MUSTAFATOKNB\MTOKSQL;Initial Catalog=A1DB;Persist Security Info=True;User ID=sa; Password=mtok6878";
connectionStr = @"Data Source=MUSTAFATOKNB\MTOKSQL;Initial Catalog=A1DB;User ID=sa;Password=mtok6878;";
connectionStr = @"Data Source=MUSTAFATOKNB\MTOKSQL;Initial Catalog=A1DB;Integrated Security=SSPI;User ID=sa;Password=mtok6878;";

它们都没有在 PocketPc 中工作,但它们都在 Windows 窗体应用程序上工作。

和想法?

4

1 回答 1

0

Connect to your SQL Server (any directory on the network) using Windows Explorer first. It will ask you for your username and password to access the network resource.

Once Windows can connect to that resource, the connection string should work.

screenshot1 screenshot2

于 2012-12-17T22:53:20.210 回答