FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV Mobile 2024
→
SQLite Android and WM 16
SQLite Android and WM 16
Débuté par Sebastian Arnold, 01 juil. 2011 15:24 - 4 réponses
Connectez-vous…
Sebastian Arnold
#1
Posté le 01 juillet 2011 - 15:24
I'm just wondering. I do a simple project with an analysis and two or three tables in WinDev Mobile 16. I generate the analysis and: I can't create the tables! 'Create the data file' in the menue is always grayed out.
If I check my connection everything seems to be ok.
Do you really want to tell me that I have to create the tables by myself, copy them to the phone and extract it with fExtractResource()?
TIA
Sebastian
--
http://arnoldconsult.de
Signaler
0
0
Robert ILES
#2
Membre enregistré
11 messages
Posté le 29 juillet 2011 - 13:14
I have exactly the same problem - di you find a solution ... I am using sqlite3 command line to do "create" commands so that the database matches the analysis .. pretty pointless
Signaler
0
0
Robert ILES
#3
Membre enregistré
11 messages
Posté le 29 juillet 2011 - 13:15
Curiously, my app HAS to copy the database and fextractresource() it as otherwise it simply wont work ... the examples provided with WinDev Mobile don't seem to need to ..... they obviously know something I don't but I can't find it in the doc, tutorials, help, forum, google search, ....... it would be helpful if the examples were more transparent
Signaler
0
0
Sebastian Arnold
#4
Posté le 29 juillet 2011 - 15:40
Robert,
A few days ago I got an answer from support:
IF
you create HyperFileSQL tables
IN
the analysis
,
you must
Use
HOpenConnection
AND
HChangeConnection
.
IN
your
CASE
,
you just
Use
:
HCreationIfNotFound
.
This is because I took a look into the examples as well. So the trick seems to be, you create the tables in your analysis with plain HyperFileSQL tables.
Then you build a switch in your project code like this
// In Android, the files are in SQLite
IF
InAndroidMode
(
)
THEN
// Describes the connection that will be used
IF
HDescribeConnection
(
MyConnection1
,
""
,
""
,
"YouDataBase.sqlite"
,
""
,
hAccessSQLiteAndroid
,
hOReadWrite
) =
False
THEN
Error
(
"Unable to describe the connection"
,
HErrorInfo
(
hErrMessage
)
)
EndProgram
(
True
)
END
// Changes the connection of the application files
IF
HChangeConnection
(
"*"
,
MyConnection1
) =
False
THEN
Error
(
"Unable to change the connection"
,
HErrorInfo
(
hErrMessage
)
)
EndProgram
(
True
)
END
END
// Create the files
IF
HCreationIfNotFound
(
"*"
) =
False
THEN
Error
(
"Unable to create the data files"
,
HErrorInfo
(
hErrMessage
)
)
EndProgram
(
True
)
END
BTW, better put this in a global function so you can use it in any other Android project.
HTH
Sebastian
--
http://arnoldconsult.de
Signaler
0
0
VAYSSE NICOLAS
#5
Posté le 27 octobre 2011 - 19:48
Hi, Same problem for me. I did create the files with SQLite Maestro.
After that from Windevmobile 16 using WDMP was OK, but i couldn't see any record!!
From windev16 i cannot write or read any record in the Sqlite file !!
Nicolas
Sebastian Arnold a écrit dans le message de news <bf97fa31b423ab4fbe7f3d4f8f56685f@news.pcsoft> :
I'm just wondering. I do a simple project with an analysis and two or three tables in WinDev Mobile 16. I generate the analysis and: I can't create the tables! 'Create the data file' in the menue is always grayed out.
If I check my connection everything seems to be ok.
Do you really want to tell me that I have to create the tables by myself, copy them to the phone and extract it with fExtractResource()?
TIA
Sebastian
--
http://arnoldconsult.de
Signaler
0
0
→ Revenir à WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte