- This topic has 13 replies, 4 voices, and was last updated 12 years, 11 months ago by Albatros78.
-
AuthorPosts
-
Renato Gaui FilhoMemberDear Wayne,
my name is Renato Gaui Filho, live in Brazil and I’m a system developer using delphi language with MS SQLServer database.
First of all, I want to congratulate you and your dev team for your very good software (nice interface, easy to use and friendly).
I made the trial download of mobione tree weeks ago, started to use and after 2 hours loved it (after the webinar I purchased it).
But I need to build a database application nut I don’t know. I already search the FAQ and HOW-TO-DO but I didn’t find nothing about it.
Please, I would like to suggest you to give us an example of an application like the Contac List, with database manipulation, where the user can insert, delete (with the red rectangle), list and search records.
If you or someone has an example of an applicatin like this, please, will be very welcome.
Hoping hear from you as soon as possible I thank you.
Best regards,
Renato
Albatros78ParticipantHello Renato,
I posted this article long ago:
http://www.genuitec.com/support-genuitec/viewtopic.php?f=8&t=1037
Hope this helps and welcome in this MB1 users forum… You’re welcome
Renato Gaui FilhoMemberHi Wayne,
I downloaded the example but when I open the “sample_db.mobi” and run at Test Center nothing happens.
All the buttons (Create Db / Create Table / Add 1 record / Delete Table) does not have any Actions at the On Click !
Please, could you try it and help me ?
Thanks,
Renato
Albatros78ParticipantHello Renato,
Here a new zipped file wich works fine.
to see th DB into tescenter, click on th black arrow on the right to enlarge the window. Click on Tool menu and Local Storgae to see DB, table and records.Wayne, during the upgrade of .mobi file to 1.4.1 all JS calling functionds into the design have been removed !!!!
Regards
Attachments:
You must be logged in to view attached files.
support-michaelKeymasterPlease note that this example is a user contribution (Albatros78) which we greatly appreciate. But it is not officially supported.
I’ll come clean on why I have not provided a comprehensive webdb example. Not wanting to come off sounding obstinate it is a matter of ROI and higher priority commitments:
1) the webdb spec has been deprecated and is no longer part of HTML5. I was keen on webdb when it was part of the HTML5 spec. But as we expand mobione across platforms other than iOS a non-standard feature will become an compatibility and support issue
Here is spec with deprecation notice http://www.w3.org/TR/webdatabase/
2) the investment in creating, doc’ing and then supporting the many “look at my sql problem…” questions for an ad hoc mechanism that is not guaranteed to be around and consistent across platforms automatically lowers its priority relative to the many mobione specific questions we receive.
Personally, a I plan to create an iOS example (with not part of HTML disclaimer) as time permits. In the meantime perhaps Albtros’ example can be updated or a quick google search will provide a bunch of hits for webdb examples that can be adapted and integrate with a mobione UI.
Renato Gaui FilhoMemberDears Albatros and Wayne,
I already executed the new “Sample DB OK MB1 1.4.1” and runned fine at Test Center.
Thanks for the help !
Best regards,
Renato
support-vadimParticipantHi Albatros78,
> Wayne, during the upgrade of .mobi file to 1.4.1 all JS calling functionds into the design have been removed !!!!
Could you please give us scenario to reproduce that? I wasn’t able to find scenario by my own.Regards,
Vadim Ridosh
Albatros78ParticipantHi Vadim,
Download the previous code (viewtopic.php?f=8&t=1037)
and try to open it with MB 1.4.1
Choose update .mobi file.All Action by JS on button action are not upgraded…
All actions are initiliazed at “none”. It’w why the project did not work for Renato with my initial filesHope this helps
Albatros78ParticipantVadim
Just a simple checking into my previous mobi project coded with previous version of MB1
Into .mobi file for examplel to init the DB the JS script function is :<Property name=”Link” type=”com.genuitec.mobione.designer.comp.iphone.links.Link” editor=”org.netbeans.modules.form.editors2.LinkEditor”>
<Link urlPath=”ext:javascript:initDB()”/>
</Property>And during the update with 1.4.1 JS function initDB() is not initialized into the GUI
Hope this helps
support-vadimParticipantHi Albatros78,
We’re able to reproduce the problem and working on it now.
Thanks for the info you provided.Regards,
Vadim Ridosh
Renato Gaui FilhoMemberDears Wayne and Albatros,
I’m building my beta database application, based at the example that you give me, but I still need some help.1. How initialize automatically a database (Sample_DB) that have been created, without press any button.
2. How UPDATE a record (I made this function but doesn’t work)
function UpdateLine()
{Tbl = document.getElementById(“m1-Sample_DB-table”).value;
MyTable = Tbl;
Nome = document.getElementById(“m1-Sample_DB-nome”).value;db.transaction(function(tx) {
tx.executeSql(“UPDATE ” + MyTable + ” WHERE firstname = ‘” + Nome + “‘” +
” SET lastname = ‘XXX'”
,function(tx,result) {
},function(tx,Error) {});alert(‘1 record updated into Table ‘ + MyTable);
}
)}3. How DELETE a record (I made this function but doesn’t work)
function DelLine()
{Tbl = document.getElementById(“m1-Sample_DB-table”).value;
MyTable = Tbl;
Nome = document.getElementById(“m1-Sample_DB-nome”).value;db.transaction(function(tx) {
tx.executeSql(“DELETE FROM ” + MyTable + ” WHERE firstname = ‘” + Nome + “‘”,function(tx,result) {
},function(tx,Error) {});alert(‘1 record deleted into Table ‘ + MyTable);
}
)}4. How SEARCH a specific record (I tried SELECT but doesn’t work)
function SearchLine()
{Tbl = document.getElementById(“m1-Sample_DB-table”).value;
MyTable = Tbl;
Nome = document.getElementById(“m1-Sample_DB-nome”).value;db.transaction(function(tx) {
tx.executeSql(“SELECT FROM ” + MyTable + ” WHERE firstname = ‘” + Nome + “‘”,function(tx,result) {
},function(tx,Error) {});alert(‘1 record seleted into Table ‘ + MyTable);
}
)}5. How fill a list of itens or combobox with the result of a SELECT ALL.
6. How make/use gestures (Ex.: moving the finger to right) to appear the RED DELETE button (like many applications).
Please, any examples/instructions/tips/statements/… will be very welcome.
Thanks you very much for the attention and help !
Best regards,
Renato
Albatros78ParticipantHello Wayne,
If the webdb spec are not supported by HTML5 what are the function available to continue to work with local db ?
Thanks
Axel
support-michaelKeymaster>If the webdb spec are not supported by HTML5 what are the function available to continue to work with local db ?
Great question. Web Storage (localStorage/sessionStorage) is the valid HTML5 spec, atm.
Here are some resources:
HTML compatibility chart
Web Storage spec
Local Storage Example
Local Storage Discussion
Albatros78Participantthks for your quick reply
-
AuthorPosts