1

Je commence la programmation sous Windows Mobile 6.5. J'installe VS2008, SDK 6.0 et DTK 6.5.3. Créer un projet (WM 6.0, .NET 3.5) et le n'est pas using System.Data.SqlClient. I System.Data est seulement Common, SqlTypes. Les références sont incluses par le créateur.Espace de noms Data.SqlClient manquant dans le projet SmartDevice (Windows Mobile)

SqlCommand comm = nouvelle SqlCommand (sSQL, nouvelle SqlConnection (sConn)); Impossible de résoudre le symbole 'SqlCommand'

Ai-je raté quelque chose? Comment connecter Sql Server à partir de l'appareil? De nombreux exemples sur internet incluent cette méthode.

J'ai également installé .NET 4.0, 4.5 et VS 2012.

No SqlClient reference No resolve option .NEt 3.5 desktop WinForm

Répondre

2

bien que je ne sais pas ce que TDK est, vous devez télécharger et installer cé sql server/compact séparément pour obtenir les objets SQLClientCE etc:

Windows Desktop

Windows Mobile

POUR L'UTILISATION DE WINDOWS MOBILE INSTALLEZ LE DEUXIÈME TÉLÉCHARGEMENT LINK! Sachez que les applications Windos Mobile 6.5 ne peuvent pas être développées avec .NET 4 ou VS 2012 ou VS 2010. La programmation portable Windows Mobile/Embeddded est uniquement prise en charge jusqu'à VS 2008! Après l'installation de Sql Server Compact for Mobile, vous disposez d'un nouveau programme «C: \ Program Files (x86) \ Microsoft SQL Server Compact Edition \ v3.5» (voir aussi 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 

Maintenant, après que vous avez commencé un nouveau projet SmartDevice ou d'ouverture un existant, vous devez ajouter des références soit System.Data.SqlClient ou System.Data.SqlServerCe:

Add SQL assembly to SmartDevice project

+0

I fr_visual_studio_2008_professional_x86_x64wow_dvd_X14-26326.iso Windows Mobile 6 Professionnel SDK Refresh.exe Windows Mobile 6.5.3 Professionnel DTK.exe Lorsque j'installe SQLClientCE je n'ai qu'une option de réparation. Je suis préoccupé par le mélange d'un ordinateur par rapport à 2008 et 2010. Exemple de projet sur .NET 3.5 a un espace de noms Data.SqlClient. Je ce projet sont inclus lib System.Data.dll. –

+0

Désolé, mais le lien dans mon message était à SQL Server 3.5 pour Desktop et non pour Mobile. Voici le lien correct http://www.microsoft.com/en-us/download/details.aspx?id=8831. Quand avez-vous installé SQL Server Compact 3.5 pour Windows Mobile? – josef

+0

Je l'ai installé maintenant. Rien n'a été changé. http://imageshack.us/g/13/screenshot2013012716575.png/ Seulement dans le mobile n'est pas SqlClient, grand écran est de bureau .NET 3.5 WinForm app. –

Questions connexes