3

Is it possible to use jaydata to read a sqlite database directly in a html 5 css js page? This whitout the use of a php or asp.net engine?

EDIT: http://jaydata.org/

asked May 29, 2012 at 15:47
2
  • 1
    What is JayData and what facilities does it provide for reading from databases regardless of the context? Commented May 29, 2012 at 15:51
  • It provides a provider agnostic data access layer with JavaScript Language Query and JavaScript CRUD capabilities. You can issue the same statements to query or store data regardless of its origin: a local webSql or a remote YQL table. Commented May 31, 2012 at 12:14

3 Answers 3

2

Since it claims to support webSQL (right at the top of the homepage)...

JayData is the unified data access library for JavaScript developers to query and update data from different sources like webSQL, indexedDB, OData, Facebook or YQL.

... — yes (since all known implementations of webSQL use SQLite under the hood ... which is why work on the W3C recommendation for it stopped).

(Although it should be noted that webSQL runs in the browser and is not a shared database that lives on the server. Exposing database servers directly to the WWW is generally a Very Bad Idea™, and SQLite is a plain file database, not one with a server, so it would require giving direct access to the server's filesystem to the WWW, which goes beyond insane).

answered May 29, 2012 at 15:58
Sign up to request clarification or add additional context in comments.

4 Comments

Since i need offline access i wil lhave to use SQLite but i will dimb down the offline db to only get the data i need.
They do not replace the browser support for sqlite , they just use it... gonna have to find another solution
@PeterAronZentai — I think the intended question might have been "Can I use jaydata to create a client side database on a browser that doesn't support WebSQL?"
@Quentin thanks your spot on , (sorry sometimes i cant explain myself clearly in english)
1

An HTML page in a browser can not access local databases, simply because it can not access the local file system. If you wanna do such a thing like opening an sqLite database file from an HTML page, you have to embed your HTML5 application into a native shell like phonegap. With that you can handle sqLite databases with JayData from within a HTML page just by using JavaScript.

answered May 31, 2012 at 12:11

5 Comments

There is an alternative way: have your JavaScript code execute in nodeJS. That way you can access arbitrary sqLite files. This can be done on the client, but you have to deploy nodeJS requirements. Whould this be an approach you could take?
i dont have any knowledge of nodeJS. Would it be doable to construct an app with nodeJS and installing it on the client desktop?
Yeah, but if you are new to this technology it might present a new factor for problems... It would create a local webserver on let's say 127.0.0.1:1234 and you still need a WebBrowser control embedded in an exe to communicate with it. So it's doable but not that simple.
Another approach could be a web application that you mark as an "Offline app" with cache manifest. That way after the first use (that must be done from the net, let's say installation) the app can run from the desktop without net using Chrome or Safari browser. You can build your sqLite database with the application (you can not reuse existing ones). Is this a way you can live with?
It answers the question about reusign an existing db ... thanks
1

You can use PhoneGap with SQLLite at the following URL is a working example.

https://groups.google.com/group/phonegap/browse_thread/thread/07cf9f48e3cd0663?pli=1

regards....

answered Jun 8, 2012 at 13:17

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.