472,971 Members | 2,075 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,971 software developers and data experts.

HTML5 database queries

I am developing a HTML5 based application. I need to process two queries concurrently, one inside another. Pseudo code attached below:

Expand|Select|Wrap|Line Numbers
  1. function main() {
  2. db.transaction( function (transaction) { transaction.executeSql(getDeptQuery, [bind1,bind2],processDepartments, errorHandler); } ); } function processDepartments(transaction, results) { for (var j=0; j
  3. { temp+= ""+results.rows.item(j).dept+"";
  4. transaction.executeSql(getEmpQuery,[bindDept],processEmployees, errorHandler);
  5. } document.getElementById('mydata').innerHTML +=temp; } function processEmployees(transaction, results1) { for (var j=0; j
  6. {
  7. temp+= ""+results1.rows.item(j).empname+"";
  8. } document.getElementById('mydata').innerHTML +=temp;
  9. }
Can someone help me with the correct syntax for achieving this.

Krishna Neeraja.
Jan 12 '10 #1
3 2916
8,658 Expert Mod 8TB
you are aware that JavaScript canít access databases?
Jan 12 '10 #2
213 Expert 100+
In HTML5 it can, but I don't know if browsers had implemented this API yet, I haven't tried it either. Anyways, from what I've read, the dbs are stored on the client side only, what seems logical, since a client side connection to a remote db is terribly insecure.
If you want to store data locally on the client's browser but want to use something better, with more granular lever of control, and more persistent than cookies, you can use DOM Storage (https://developer.mozilla.org/en/DOM/Storage)
Jan 12 '10 #3
213 Expert 100+
The code krishnaneeraja provided is from palm webOS, I don't think that will work in a regular browser.
Jan 12 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

by: arabub | last post by:
I have an installation of Apache that apparently includes PHP (out of the box Redhat 9.0). If I make database calls to Postgresql, as what user is that call going to be made? The user that...
by: Jules | last post by:
Hi, newbie here: I have created a small (5 fields) Access table which I will be converting to MS-SQL Server format when the ASP code has been completed. It is basically a collection of links to...
by: cover | last post by:
Hi, Is there a site that anyone knows of, that shows creating a MySQL database from input through output is concerned? I'd LOVE to see a tutorial that included the interface for input, the usable...
by: mandara | last post by:
hi i was not able to write a programs such that it retrives the data from the database through sql queries and get the output in Excel using perl.when i write multiple Queries i need to get all...
by: jaffar.kazi | last post by:
Hi All. This might be the wrong group to post this query, since it is ADO.NET related, but I couldn't find any ADO.NET group. My problem is that I want to write some queries, which use temp...
by: DNB | last post by:
I would like to know what you guys think is the best way to access data: Asp.Net session vs. Database Queries. In our application we are using asp.net tree view to display hierarchical data and...
by: DNB | last post by:
I did post this message in C# group also... I would like to know what you guys think is the best way to access data: Asp.Net session vs. Database Queries. In our application we are using...
by: dantebothermy | last post by:
Friends: I create excel spreadsheets linked to central SQL Server or Access databases. The difficulty is that often users are unable to refresh the linked data -- even when they have security...
by: munkee | last post by:
Hi all, I understand if you have your back end located on a server and use things like mysql etc you are able to analyse a query from execution through to how it returns records to be able to see...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.