Can a flex web app access a sqlite database? - apache-flex

I'm making an application (web based) using flex and i have a requirment to access the SQLite database on the local system. There is no server running and i've decided to give them the link to the html file and see how that works out.
So in the root directory, there will be all required swf, html files, etc and a .db file. Can i access that database thro the flex web application ?
Please help.

No. Flex can access an SQLite database via the Air SDK, but you are out of luck when running from the browser sandbox/SDK.

If you don't like to use AIR SDK, You can do that by Java applet. You can make a collection of needed JavaScript functions on the web page to be called by Flex and their will call a Java applets functions to deal with SQLite instead of using HTTP services.

Related

Connect Azure database to existing Asp.Net web application

I'm actually working on an university project and have to figure out how to connect my windows azure database to an already existing ASP.net web application project.
The web application should run on smartphones and tablets.
Since this is a group project, we use TFVC to manage the project.
Our client supplied an mysql script that will create the tables needed.
The Database is hosted in Azure and we want to access it through Visual Studio ultimate, so we can reveice data from the DB and integrate it's data in the application.
I also got the connection string, so I could use it if needed.
So my question is:
How can I connect to the database through visual studio and afterwards: how can I access to it? With access I mean, how and where can I use SQL queries in Visual Studio?
I don't really know where to start, whether it is connecting to the DB via code or on another way.
Every kind of help is welcome.
Thank you in advance.
Your question is still quite vague on specifics of what you want to achieve but hopefully this answers it. If not, please provide even more detail on your question.
If you just want to see the DB in Visual Studio and interact with it
Download the Azure SDK
Go to Tools > Connect To Database
A side box will open and you can navigation through Azure then to your database.
Personally I prefer using SQL Server Management Studio, its much more responsive that the UI through Visual Studio.
If you want to connect your application to Azure, as in code an application that talks to a database, then you just need to replace the connection string in your Web.Config to your Azure Connection String. Then either use ADO.NET, Entity Framework or another ORM.
I recommend Entity Framework but it all depends on what your circumstances and project requirements are.
If the DB already has its schema defined get started here:
https://www.asp.net/mvc/overview/getting-started/database-first-development/setting-up-database
If its empty you can use code first:
http://www.asp.net/mvc/overview/getting-started/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application

How can use Box.API with Asp.Net web service?

I have used asp.net(c#) web service for my project. I am calling save file function from front end adobe flex environment. My files are exists on web service folder.
My web application is an intranet application and currently used google docs api for uploading and retriving files for the project.
Now i want to use service of box.com and using box.com api, i want to upload and download the files.
Question: In google docs api, i have generated authorization code using login credential that will help to create token and using this token help me to upload files , download files and create/update/Delete folders.
How can i will do same for the box.com api ?
How can i will authorized and create token in my web services ?
Have you taken a look at:
https://github.com/box/box-windows-sdk-v2
The SDK supports .NET version 4.0 and up. For ease of installation, try pulling the package from nuget.org:
http://www.nuget.org/packages/Box.V2/
Examples are available in the readme as well as in the Box.V2.Samples solution folder
HTH

Can i use sqllite Database with Flex web application?

I am trying to create a Flex web application that can store the data in sqllite Database.
Can any one help me that how can i do that?
From Flex web application you can interact with any Database, not only SQLite.
But this can't be done directly. You need to use a server that will accept request from your app and store data in Database.
There is discussion on Adobe forums already.
http://forums.adobe.com/thread/501997
You can try to store the SQLite Database on your server and every time you need to update it download the database inside the app. And after update upload it back.
There is a good solution in this topic:
How do you open a remote sqlite database over http?
Yes, flex can interact with any DB if using blazeds/java srvice/.net/php layer in between, if the DB is in the server. Flex web app cannot interact with any DB directly.
Because you are asking for sqllite, flex cannot create the sqllite on the client as it will be come the security sandbox violation. You can only do it with Adobe air framework, direct interaction with the sql db.
If your db is hosted on server side, you can connect flex to the database use server side technologies.
If you want a db on client side. you may take a look at here. As Flex can interact with js through ExternalInterface, you may access the local database from Flex

Running application from browser ASP.NET

I have a c# windows application that can successfully record audio using user's desktop mic.
Now i want this facility to run from ASP.NET website. (Note: user would not have this application installed on his machine).
Is there a way that i can run this application from a web page and record and save sound file on user's desktop? I searched on google and found that it is achievable using ActiveX. But i am not sure how to do this.... :((
Any Clue...??
Thanks...
You are not going to be able to do this using standard HTML / web browser functionality.
You will need to use a richer, client-side platform like Silverlight or Flash. ActiveX could also support this, but it's a pretty dated technology. Better to go with Silverlight or Flash.

Connecting iPhone to an ODBC Database

I'm new to iOS development. I have to make an application that connects to a Sybase database. My bet would be to use ODBC. Does anyone know how to connect to an ODBC enabled database from within objective C.
I've encountered applications that can do this but I don't seem to find any specific iOS related documentation or source code examples. Does anyone have even the slightest idea?
Thanks in advance!
There is a new ODBC SDK for iOS available at http://ODBCrouter.com/ipad complete with screenshots and an app you may download and use with the online demonstration system.
Mostly you want to get to remote databases through a web service layer. The app I'm currently working on does a TON of database interaction, and I wrote a number of PHP scripts that live on a web server on the same machine with the database. My PHP receives web requests from the app, does the DB work, and responds with JSON objects. You can obviously use any web layer you want--asp, perl, you name it--and respond with XML if you prefer. Doesn't matter.
I don't know of anybody actually interacting live with a database interface, ODBC or otherwise, directly from the phone. The way people seem to be going about it is via an intermediate web app layer.
iPhone SDK can use SQLite I am unsure of others. Perhaps the best choice will to be to free it of the ODBC issue and write a web service façade to provide the database access.
WCF Data Services /w Entity Framework and the OData client library for iOS will give you full CRUD access to the schema.

Resources