1

WindowsMo​​bile6.5でプログラミングを開始します。VS2008、SDK 6.0、DTK6.5.3をインストールします。プロジェクト(WM 6.0、.NET 3.5)を作成し、System.Data.SqlClientを使用しません。I System.DataのみがCommon、SqlTypesです。参照は作成者によって含まれています。

SqlCommand comm = new SqlCommand(sSQL、new SqlConnection(sConn)); シンボル'SqlCommand'を解決できません

私は何か見落としてますか?デバイスからSQLServerに接続するにはどうすればよいですか?インターネット上の多くの例には、この方法が含まれています。

.NET 4.0、4.5、およびVS2012もインストールしました。

SqlClient参照なし 解決オプションなし .NEt3.5デスクトップWinForm

4

1 に答える 1

2

TDKとは何かわかりませんが、SQLClientCEなどのオブジェクトを取得するには、SQL Server CE/Compactを個別にダウンロードしてインストールする必要があります。

Windowsデスクトップ

Windows Mobile

WINDOWS MOBILEを使用する場合は、2番目のリンクのダウンロードをインストールしてください。

Windos Mobile 6.5アプリは、.NET4またはVS2012またはVS2010では開発できないことに注意してください。WindowsMo​​bile/埋め込みハンドヘルドプログラミングは、VS2008までしかサポートされていません。

Sql Server Compact for Mobileをインストールすると、新しいプログラムディレクトリ「C:\ ProgramFiles(x86)\ Microsoft SQL Server Compact Edition \ v3.5」が作成されます(添付のslq_server_compact35_files.txtも参照)。

Folder PATH listing
Volume serial number is 00000200 7803:48E6
C:.
|   EULA_EN.rtf
|   EULA_ENU.rtf
|   ReadmeSSCE35_ENU.htm
|   REDIST_ENU.TXT
|   sqlceca35.dll
|   sqlcecompact35.dll
|   sqlceer35EN.dll
|   sqlceme35.dll
|   sqlceoledb35.dll
|   sqlceqp35.dll
|   sqlcese35.dll
|   System.Data.SqlServerCe.Entity.dll
|   
+---Desktop
|   |   System.Data.SqlServerCe.dll
|   |   
|   \---EN
|           System.Data.SqlServerCe.xml
|           
+---Devices
|   |   EULA_ENU.rtf
|   |   System.Data.SqlServerCe.dll
|   |   
|   +---Client
|   |   |   System.Data.SqlClient.dll
|   |   |   
|   |   +---EN
|   |   |       System.Data.SqlClient.xml
|   |   |       
|   |   +---wce400
|   |   |   \---armv4
|   |   |           dbnetlib.dll
|   |   |           sql.dev.ENU.ppc.wce4.armv4.CAB
|   |   |           sql.ppc.wce4.armv4.CAB
|   |   |           
|   |   \---wce500
|   |       +---armv4i
|   |       |       dbnetlib.dll
|   |       |       sql.dev.ENU.phone.wce5.armv4i.CAB
|   |       |       sql.dev.ENU.ppc.wce5.armv4i.CAB
|   |       |       sql.dev.ENU.wce5.armv4i.CAB
|   |       |       sql.phone.wce5.armv4i.CAB
|   |       |       sql.ppc.wce5.armv4i.CAB
|   |       |       sql.wce5.armv4i.CAB
|   |       |       
|   |       +---mipsii
|   |       |       dbnetlib.dll
|   |       |       sql.dev.ENU.wce5.mipsii.CAB
|   |       |       sql.wce5.mipsii.CAB
|   |       |       
|   |       +---mipsii_fp
|   |       |       dbnetlib.dll
|   |       |       sql.dev.ENU.wce5.mipsii_fp.CAB
|   |       |       sql.wce5.mipsii_fp.CAB
|   |       |       
|   |       +---mipsiv
|   |       |       dbnetlib.dll
|   |       |       sql.dev.ENU.wce5.mipsiv.CAB
|   |       |       sql.wce5.mipsiv.CAB
|   |       |       
|   |       +---mipsiv_fp
|   |       |       dbnetlib.dll
|   |       |       sql.dev.ENU.wce5.mipsiv_fp.CAB
|   |       |       sql.wce5.mipsiv_fp.CAB
|   |       |       
|   |       +---sh4
|   |       |       dbnetlib.dll
|   |       |       sql.dev.ENU.wce5.sh4.CAB
|   |       |       sql.wce5.sh4.CAB
|   |       |       
|   |       \---x86
|   |               dbnetlib.dll
|   |               sql.dev.ENU.wce5.x86.CAB
|   |               sql.wce5.x86.CAB
|   |               
|   +---EN
|   |       System.Data.SqlServerCe.xml
|   |       
|   +---wce400
|   |   \---armv4
|   |           sqlce.dev.ENU.ppc.wce4.armv4.CAB
|   |           sqlce.ppc.wce4.armv4.CAB
|   |           sqlce.repl.ppc.wce4.armv4.CAB
|   |           sqlceca35.dll
|   |           sqlcecompact35.dll
|   |           sqlceer35EN.dll
|   |           sqlceme35.dll
|   |           sqlceoledb35.dll
|   |           sqlceqp35.dll
|   |           sqlcese35.dll
|   |           upgrade.exe
|   |           
|   \---wce500
|       +---armv4i
|       |       sqlce.dev.ENU.phone.wce5.armv4i.CAB
|       |       sqlce.dev.ENU.ppc.wce5.armv4i.CAB
|       |       sqlce.dev.ENU.wce5.armv4i.CAB
|       |       sqlce.phone.wce5.armv4i.CAB
|       |       sqlce.ppc.wce5.armv4i.CAB
|       |       sqlce.repl.phone.wce5.armv4i.CAB
|       |       sqlce.repl.ppc.wce5.armv4i.CAB
|       |       sqlce.repl.wce5.armv4i.CAB
|       |       sqlce.wce5.armv4i.CAB
|       |       sqlceca35.dll
|       |       sqlcecompact35.dll
|       |       sqlceer35EN.dll
|       |       sqlceme35.dll
|       |       sqlceoledb35.dll
|       |       sqlceqp35.dll
|       |       sqlcese35.dll
|       |       upgrade.exe
|       |       
|       +---mipsii
|       |       sqlce.dev.ENU.wce5.mipsii.CAB
|       |       sqlce.repl.wce5.mipsii.CAB
|       |       sqlce.wce5.mipsii.CAB
|       |       sqlceca35.dll
|       |       sqlcecompact35.dll
|       |       sqlceer35EN.dll
|       |       sqlceme35.dll
|       |       sqlceoledb35.dll
|       |       sqlceqp35.dll
|       |       sqlcese35.dll
|       |       upgrade.exe
|       |       
|       +---mipsii_fp
|       |       sqlce.dev.ENU.wce5.mipsii_fp.CAB
|       |       sqlce.repl.wce5.mipsii_fp.CAB
|       |       sqlce.wce5.mipsii_fp.CAB
|       |       sqlceca35.dll
|       |       sqlcecompact35.dll
|       |       sqlceer35EN.dll
|       |       sqlceme35.dll
|       |       sqlceoledb35.dll
|       |       sqlceqp35.dll
|       |       sqlcese35.dll
|       |       upgrade.exe
|       |       
|       +---mipsiv
|       |       sqlce.dev.ENU.wce5.mipsiv.CAB
|       |       sqlce.repl.wce5.mipsiv.CAB
|       |       sqlce.wce5.mipsiv.CAB
|       |       sqlceca35.dll
|       |       sqlcecompact35.dll
|       |       sqlceer35EN.dll
|       |       sqlceme35.dll
|       |       sqlceoledb35.dll
|       |       sqlceqp35.dll
|       |       sqlcese35.dll
|       |       upgrade.exe
|       |       
|       +---mipsiv_fp
|       |       sqlce.dev.ENU.wce5.mipsiv_fp.CAB
|       |       sqlce.repl.wce5.mipsiv_fp.CAB
|       |       sqlce.wce5.mipsiv_fp.CAB
|       |       sqlceca35.dll
|       |       sqlcecompact35.dll
|       |       sqlceer35EN.dll
|       |       sqlceme35.dll
|       |       sqlceoledb35.dll
|       |       sqlceqp35.dll
|       |       sqlcese35.dll
|       |       upgrade.exe
|       |       
|       +---sh4
|       |       sqlce.dev.ENU.wce5.sh4.CAB
|       |       sqlce.repl.wce5.sh4.CAB
|       |       sqlce.wce5.sh4.CAB
|       |       sqlceca35.dll
|       |       sqlcecompact35.dll
|       |       sqlceer35EN.dll
|       |       sqlceme35.dll
|       |       sqlceoledb35.dll
|       |       sqlceqp35.dll
|       |       sqlcese35.dll
|       |       upgrade.exe
|       |       
|       \---x86
|               sqlce.dev.ENU.wce5.x86.CAB
|               sqlce.repl.wce5.x86.CAB
|               sqlce.wce5.x86.CAB
|               sqlceca35.dll
|               sqlcecompact35.dll
|               sqlceer35EN.dll
|               sqlceme35.dll
|               sqlceoledb35.dll
|               sqlceqp35.dll
|               sqlcese35.dll
|               upgrade.exe
|               
+---Include
|       sqlce_err.h
|       sqlce_oledb.h
|       sqlce_sync.h
|       
+---Private
|       System.Data.SqlServerCe.dll
|       System.Data.SqlServerCe.Entity.dll
|       
+---Samples
|       Northwind.sdf
|       
\---Tools
    |   ConnWiz.exe
    |   EULA_ENU.rtf
    |   Microsoft.SqlServerCe.Client.dll
    |   Microsoft.SqlServerCe.Enumerator.dll
    |   Microsoft.SqlServerCe.ManagementUI.dll
    |   Microsoft.SqlServerCe.ReplWiz.dll
    |   SSCEServerTools-ENU.msi
    |   
    \---SQLWorkbenchProjectItems
        |   SQLWorkbenchProjectItems.vsdir
        |   
        \---SqlCe
            |   sqlce.vsdir
            |   SQLCEFile.sqlce
            |   
            +---Database
            |       Create Database.sqlce
            |       Drop Database.sqlce
            |       
            +---Index
            |       Create Index.sqlce
            |       Create Unique Index.sqlce
            |       Drop Index.sqlce
            |       
            \---Table
                    Alter Table Add Column.sqlce
                    Alter Table Add Primary Key.sqlce
                    Alter Table Drop Column.sqlce
                    Alter Table Drop Constraint.sqlce
                    Create Table Primary Key.sqlce
                    Create Table with Identity Column.sqlce
                    Create Table.sqlce
                    Drop Table.sqlce

ここで、新しいSmartDeviceプロジェクトを開始した後、または既存のプロジェクトを開いた後、System.Data.SqlClientまたはSystem.Data.SqlServerCEのいずれかに参照を追加する必要があります。

SQLアセンブリをSmartDeviceプロジェクトに追加します

于 2013-01-25T16:58:12.163 に答える