heli_doc Posted December 6, 2012 Share Posted December 6, 2012 I'd like to access a database that is on the client side via Javascript and was wondering how to best go about this. I was thinking it may work to use Ajax to call a C# data application, but wondered if that would be most efficient. I suppose PHP would be another alternative, but I prefer working in C# if I can. Thanks! 1 Link to comment Share on other sites More sharing options...
niche Posted December 6, 2012 Share Posted December 6, 2012 Viola! http://w3schools.com/php/php_ajax_intro.asp Link to comment Share on other sites More sharing options...
justsomeguy Posted December 6, 2012 Share Posted December 6, 2012 You won't be able to use ajax to send a request to the user's filesystem without changing browser settings. You can set up a web server on the client and send ajax requests to that but you'll need to change security settings to allow your browser to send cross-domain ajax requests. 1 Link to comment Share on other sites More sharing options...
heli_doc Posted December 7, 2012 Author Share Posted December 7, 2012 I know I can get at the data I want via C#, but not sure how to get the data to JavaScript. I'll look into a client-side web server, which I hadn't thought of before. Link to comment Share on other sites More sharing options...
niche Posted December 7, 2012 Share Posted December 7, 2012 (edited) Please excuse me. I missed that "client side" ref. What kind of info is supposed to be the user's database? Edited December 7, 2012 by niche Link to comment Share on other sites More sharing options...
davej Posted December 9, 2012 Share Posted December 9, 2012 I'm guessing you are talking about a standard MSSQL Server or MySQL database on the client side. You may know that HTML5 offers a client-side SQL database API but this has no connection to standard databases. You might look into using a signed Java Applet. HTML5 can also talk to local files so maybe it could use files to communicate with a desktop program. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now