- This topic has 4 replies, 2 voices, and was last updated 13 years ago by
support-octavio.
-
AuthorPosts
-
leopanMemberHy,
i have this problem: my app have more screens. The first is main manù, the second screen is a screen of data entry in database.
For each instance, the first use of the app i can enter data into the database without problem, but if i go to back in menu and run the second screen (for the second time) my app don’t insert in database. I have insert my code in custom file of the menù screen (the first screen)
We can help me?
Thanks.the code of access ed insert database is this:
Access database
function ApriDb()
{if (window.openDatabase)
{
db = openDatabase(“Db”, “1.0”, “Database app”, 400000);
if (!db)
alert(“Impossibile aprire il database del dispositivo.”);
}
else
alert(“Impossibile accedere al database”);
}Insert Database
function InsertMov()
{if (FlagInsertimento==true)
{db.transaction(function(tx) {
tx.executeSql(“SELECT COUNT(*) FROM Persone”, [], function(result) {
}, function(tx, error) {
tx.executeSql(“CREATE TABLE Persone (ID INTEGER PRIMARY KEY AUTOINCREMENT, Nome TEXT, Cognome TEXT, Indirizzo TEXT)”, [], function(result) { });
});
});
db.transaction(function (tx) {
tx.executeSql(“INSERT INTO Persone(Nome, Cognome, Indirizzo) VALUES (?, ?, ?)” , [$(‘#m1-Inserisci-Nome’).val(), $(‘#m1-Inserisci-Cognome’).val(), $(‘#m1-Inserisci-Indirizzo’).val()]);
});
alert(“Dati inseriti”);
}}
June 8, 2012 at 10:43 am #326930
support-octavioMemberHi,
I almost sure that your issue is the same that this post: http://www.genuitec.com/support-genuitec/viewtopic.php?f=8&t=3047
Please see my reply and let me know if your problem with your code continues after follow my recommendations.
June 12, 2012 at 2:46 am #327040
leopanMemberDear Octavio,
this happens only with the emulator. I ran the code with the iphone and it works wellJune 12, 2012 at 4:22 pm #327063
support-octavioMemberHi leopan,
Your issue is in our queue. Will inform when replicate the problem and know more about it.
June 13, 2012 at 1:56 pm #327089
support-octavioMemberI tried to replicate your issue in TC, but had not success. Could you provide the steps to replicate it? Also if you think your project will help us to find a solution please attach it to thread or send us a copy to support at genuitec dot com
-
AuthorPosts