IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Développement Mobile .NET Discussion :

Cordova et SQLite [Débutant]


Sujet :

Développement Mobile .NET

  1. #1
    Membre confirmé
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2009
    Messages
    540
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Vendée (Pays de la Loire)

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2009
    Messages : 540
    Points : 532
    Points
    532
    Par défaut Cordova et SQLite
    Bonjour,

    Tout d'abord, si je ne suis pas dans la bonne section ou si je n'ai pas vu de sujet qui traite déjà mon problème, je m'en excuse et vous demande de me diriger là où il le faut.

    J'ai pour objectif de développer une application Windows 10 dans un premier temps qui devra ensuite être portable en une application mobile et sous un navigateur. C'est pour cela que la solution Cordova a été choisie par l'équipe.
    Je fais donc des recherche pour faire interagir mon application (pour le moment très simpliste) avec une basse de données embarquée. Je n'ai trouvé que SQLite. J'ajoute alors la plateforme Windows et cela me génère du code pour une application Windows 10.
    Pour SQLite, j'ai à ma disposition plusieurs plugins :
    - cordova-sqlite-legacy : lorsque je fais appelle à la fonction window.sqlitePlugin.openDatabase, j'ai un plantage car window.sqlitePlugin vaut null. J'en déduis que mon plugin n'est pas chargé mais je ne sais pas pourquoi
    - cordova-sqlite-plugin : L'application ne démarre pas car le fichier SQLite3.winmd est introuvable. Il est aussi introuvable sur internet et le pluggin ne le crée pas,
    - cordova-plugin-sqlite : idem cordova-sqlite-plugin qui de plus serait déprécié,
    - cordova-sqlite-storage : il serait incompatible avec Windows. Pourtant l'appli démarre et ne plante pas. Elle ne parvient pas à ouvrir la base de donnée (Could not open database).

    Cela fait maintenant 3 jours que je bloque et je suis à court d'idée. Aurez-vous une idée pour me débloquer sur l'un de ces plugins svp ?

    Merci beaucoup d'avance

  2. #2
    Membre confirmé
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2009
    Messages
    540
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Vendée (Pays de la Loire)

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2009
    Messages : 540
    Points : 532
    Points
    532
    Par défaut
    J'apporte d'autres informations car j'ai pu avancer un peu sur "cordova-sqlite-plugin" et "cordova-plugin-sqlite".
    J'ai essayé de les lancer en invite de commande "cordova run windows".
    - cordova-sqlite-plugin : Après avoir trouvé sur le site SQLite le fichier sqlite3.c, j'obtiens l'erreur :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35536): error C2065: 'AreFileApisANSI'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite
    3-WinRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35566): error C2065: 'CreateFileA'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3-Wi
    nRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35575): error C2065: 'CreateFileW'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3-Wi
    nRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35586): error C2065: 'CreateFileMappingA'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQL
    ite3-WinRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35596): error C2065: 'CreateFileMappingW'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQL
    ite3-WinRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35605): error C2065: 'CreateMutexW'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3-W
    inRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35682): error C2065: 'GetDiskFreeSpaceA'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLi
    te3-WinRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35691): error C2065: 'GetDiskFreeSpaceW'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLi
    te3-WinRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35700): error C2065: 'GetFileAttributesA'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQL
    ite3-WinRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35708): error C2065: 'GetFileAttributesW'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQL
    ite3-WinRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35725): error C2065: 'GetFileSize'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3-Wi
    nRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35733): error C2065: 'GetFullPathNameA'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLit
    e3-WinRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35742): error C2065: 'GetFullPathNameW'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLit
    e3-WinRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35771): error C2065: 'GetSystemInfo'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3-
    WinRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35792): error C2065: 'GetTempPathA'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3-W
    inRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35800): error C2065: 'GetTempPathW'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3-W
    inRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35808): error C2065: 'GetTickCount'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3-W
    inRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35840): error C2065: 'HeapCreate'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3-Win
    RT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35849): error C2065: 'HeapDestroy'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3-Wi
    nRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35871): error C2065: 'HeapValidate'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3-W
    inRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35880): error C2065: 'HeapCompact'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3-Wi
    nRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35888): error C2065: 'LoadLibraryA'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3-W
    inRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35897): error C2065: 'LoadLibraryW'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3-W
    inRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35905): error C2065: 'LocalFree'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3-WinR
    T\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35913): error C2065: 'LockFile'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3-WinRT
    \SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35936): error C2065: 'MapViewOfFile'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3-
    WinRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35964): error C2065: 'SetFilePointer'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3
    -WinRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(35986): error C2065: 'UnlockFile'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3-Win
    RT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(36033): error C2065: 'WaitForSingleObject'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQ
    Lite3-WinRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(36183): error C2099: l'initialiseur n'est pas une constante [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src\windows\SQLite3-WinRT\
    SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(36897): error C2065: 'FORMAT_MESSAGE_ALLOCATE_BUFFER'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src
    \windows\SQLite3-WinRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    c:\dev\cordova-sandbox\07sqlitew\plugins\cordova-sqlite-plugin\src\external\sqlite3.c(36921): error C2065: 'FORMAT_MESSAGE_ALLOCATE_BUFFER'*: identificateur non déclaré [c:\dev\cordova-sandbox\07SQLiteW\plugins\cordova-sqlite-plugin\src
    \windows\SQLite3-WinRT\SQLite3\SQLite3.Windows\SQLite3.Windows.vcxproj]
    ERROR running one or more of the platforms: Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1
    You may not have the required environment or OS to run this project
    - cordova-plugin-sqlite : j'obtiens l'erreur
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(4388,5): error APPX0505:  L'architecture du processeur du projet 'neutral' ne correspond pas à l'architecture du processeur 'x86' du projet 'SQLite3' référencé. Modifiez l'une des architectures de processeur ciblées de sorte qu'elles soient identiques. [c:\dev\cordova-sandbox\07SQLiteW\platforms\windows\CordovaApp.Windows.jsproj]
    Je sèche

  3. #3
    Membre confirmé
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2009
    Messages
    540
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Vendée (Pays de la Loire)

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2009
    Messages : 540
    Points : 532
    Points
    532
    Par défaut
    J'ai fini par résoudre mon propre problème si cela peut servir à quelqu'un.
    L'architecture neutral est donc le choix "any cpu" fait sous Visual Studio. SQLite n'a pas de dll permettant d'être exécuté dans ce mode hybride. Il faut alors lancer l'application en x86 ou en x64.

    Mon problème de base n'a donc pas de solution...

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. qui connait sqlite ?
    Par Emmanuel Lecoester dans le forum SQLite
    Réponses: 23
    Dernier message: 19/02/2010, 13h44
  2. SQLITE
    Par Betatesteur dans le forum SQLite
    Réponses: 2
    Dernier message: 24/06/2005, 12h41
  3. [SQLite]éliminer un motif dans des champ TEXT
    Par Invité(e) dans le forum Langage SQL
    Réponses: 2
    Dernier message: 26/05/2005, 17h44
  4. base de données en sqlite
    Par Cyrillou dans le forum SQLite
    Réponses: 1
    Dernier message: 12/05/2005, 15h37
  5. debuter en SQLite
    Par venomelektro dans le forum SQLite
    Réponses: 4
    Dernier message: 08/12/2004, 19h17

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo