Pulling Data From an SQL Database in HTML 5 - sql

I am trying to develop a BlackBerry application that will show data from an SQL Database from a server. I was researching the new HTML 5 option for blackberry (WebWorks) and noticed that it apparently cannot connect to any server data by itself. Some links state that I would need javascript coding to obtain it. I looked into the option of PhoneGap (link here: http://phonegap.com/) and decided I'd try using HTML 5 to produce the application. I have never touched SQL databases before and I am wondering how I would connect the two; meaning how do you pull data from the server given that you are working with HTML5?
I have looked at:
Where is data stored when using an HTML 5 Web SQL Database
Process for pulling data from a sql database
among others but I am still unsure as to what to do. I would be looking to "view" the data from the server and display it on the app. It would be something of the sort:
- HomeScreen: What data would you like to view?:
- Dropdown list of categories (from the database)
- Selecting Entry in dropdown leads to available information (from the database)
Any help would be appreciated, and of course thanks in advance.

the new (and pretty awesome) features of HTML5 is happening in the browser on the client side. What you will need is a back-end on the server side doing some magic. It is true that browsers now have databases but these are located on the phone, computer etc and as I understand your question you want these data to communicate with data on your server. To move data across the web you will need to perform HTTP-requests which can easily be done through javascript and ajax. Look a bit into these technologies and make a little server-side script that gathers data from the database and send it in a structured format to the phone (JSON, XML), then make a script in javascript on the client-side that parse these data and utilise them.
Good luck!

Related

Get data from the db to the view page in ASP.NET MVC

I am working on live support project for a web site. I just wrote the frontend and I created the table that I need in SQL Server and then I made a connection between SQL Server and my ASP.NET MVC project.
I watched many videos and I didn't get the part which I will start get the data from the models which are created when I made the connection I talked about.
To be clear: I wrote two Divs in web page one for the sender and one for the receiver and I give messages a variable called ̰"destination" in DB so if the value is 0 it will be insert the text in sender's div and if the value is 1 it will be insert the text in receiver's div.
The problem that I know the logic but I don't know how to apply it. Please can anyone help me and tell me how to do it? Or what is the Technique that I should work with?
You should start looking into Entity Framework to get the data from the database. I think for now you should use Database First approach which is very easy as compared to Code first approach.
To start with Database first just add new item and select ADO.NET Entity Model . This will launch the wizard where you can select EF designer from database and then you can give the connection string and all the databse you want to use
Refer below link for explanation.
http://debugonweb.com/2020/01/crud-operation-using-database-first-approach-asp-net-mvc/

Qlik Sense: How to accept user input to a column in a table and write back to source

In Qlik Sense, I have a task to allow users to enter comments next to each row in a table. The source is currently from an excel file but if I can figure this out, it will be from a database. The goal is to have the user's comments be written back to the source.
I am stuck currently on how to allow the user to enter comments in the existing table from Qlik Sense.
Any pointers?
Qlik does not have this capability. Qlik (and the other similar tools) don't write data back. They consume data.
Said that ... I had similar requirement few years ago - users to be able to write comments based on the data that is displayed (based on the current selections). My solution was to write QV extension that sends the selections and user input data to web server (NodeJS in my case) and the web server was storing the data in text file which was then consumed back from Qlik. With this approach the web server can do whatever you want with the data - write files, write in db, trigger actions etc.
But again - there is no way to write back to the database from the UI with the default tools
Repo with the QV extension and the server - https://github.com/countnazgul/qv-add-comment

Directly perform SQL queries from iPhone to an online server

I'm a newbie and tend to do a simple iOS applications.
The mission is making an app that does the registeration for a person and then upload that data to an online server.
In detail, I want to insert, delete, update data directly to online server.
Would anyone show me what I have to do with (tool, library...)?
I have worked with SQlite to make a local database for the iPhone and it worked well, now it is about dealing with an online server.
For performing remote request there are two ways:
1) https://github.com/smhuang426/MySqueakQl - this is "basic" implementation for remote access to DB. http://www.karlkraft.com/index.php/2010/09/17/mysql-for-iphone-and-osx/ - more advanced, in articles you may some instructions how use this framework. In this case you use SQL C API and you can write your own special classes. Example: http://blog.iosplace.com/?p=30 , http://zetcode.com/tutorials/mysqlcapitutorial/ and description of C API http://dev.mysql.com/doc/refman/5.0/en/c-api-function-overview.html
2) PHP script that posted on online server, you use async ASIHTTP (or ordinary NSRequest) that send to this script, and script works directly with sql DB on tis server. Example ( iOS no communication between iPhone app and MySQL database via PHP). In this case you achieved more security, but also there some limitations like decrease of app's speed and server must supply PHP.
Good luck!
What you need is some kind of remote API available which you will use to interface the iPhone application and say, a MySQL database.

How to store data from iOS app in a remote database safely and Apple friendly?

How would one go about incorporating, for example a 'mailing list' where user could fill in a text field for 'name' and 'email address' and click a submit button that would add the data to a database on a remote server.
Property lists would be the most convenient but the whole plist would need to be downloaded to the users device, modified and reuploaded (which looks involved and easily corrupted). SQLite is likewise built for a local database. Is there a simple way to do this or is server side php scripting the only real answer?
I see a lot of replies about this question that specify a specific database type and programming solution. The real solution is a web service, of any kind, and a data store, of any kind.
This could be SQL Server with a web service written in ASP.NET. It could also just as easily be a MySQL database with an interface written in PHP. But for the love all things secure don't try to attach to a database directly.
It would appear the most practical method at this time is a remote MySQL (or similar) database queried from php scripts that are called from the app via NSURLRequests (. Information about the query can be sent using the _POST variable.

iphone programming getting data from remote server

HI,
I'm new to iphone programming and developing travel application, which retrieve most of it data from remote database.
What is the best way to implement this solution? I thought of generating XML files in server side and getting data via XML files to iPhone app and displaying them...
Is there better implementation to this, thank you in advance?
Waruna.
It's up to you and the kind of data you are using and any licenseing concerns.
I chose to use json, as data being transferred is more compact, and there is a json framework available here. There are quite a lot of tutorials available for it too.
I've used it very succesfully with a php backend on a couple of projects.