Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
My Carrier: Vodafone

Connecting HTML5 to a database

Hi all,

          Im developing an application which fetches data from the database(MySQL) and show it into HTML5 page. Is there any possibility to link database via HTML5 without using any intermediate pages like asp,php,jsp..... to fetch data. 

Developer
Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: Connecting HTML5 to a database

[ Edited ]

Hi there!

Is the database local or in a server?

If it's in a server you need to have a server-side script and call it via ajax, for example.

If it's local, you can use HTML5 Web SQL https://developer.blackberry.com/html5/apis/SQLTransaction.html

Nuno
Developer
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
My Carrier: Vodafone

Re: Connecting HTML5 to a database

Database in server. U saying without script there is no way to fetch data...........

 

Developer
Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: Connecting HTML5 to a database

If it's in a server you can make ajax to call the server-side script, retrieve the data and then process it locally.

What exactly is your question?

Nuno
Developer
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
My Carrier: Vodafone

Re: Connecting HTML5 to a database

Im looking for a way to fetch data using HTML5 tags with some javascript  instead of using a script language to fetch the data.

Developer
Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: Connecting HTML5 to a database

on the app side, no problem.

but as the data is on the server, you still need something on the server-side to the data fetching and sending it back to the app. can also be javascript, i guess, with node.js maybe? Not sure as I have zero experience with it.

Nuno
Developer
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: Connecting HTML5 to a database

You could migrate your database to MongoDB or CouchDB. They were designed for cases like yours.

 

 

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.