iPhone Sdk can Access SQL Server Directly [duplicate] - iphone

This question already has answers here:
How do i query data from SQL Server 2005/2008 databases to iPhone
(2 answers)
Closed 9 years ago.
Is it possible that we access SQL Server 2005/2008 through iPhone app using any Framework, Library etc. I know that SQL Server can be accessed using XML web services & those web services can communicate to an iPhone app. I want to confirm if we can directly access the SQL Server 2005/2008 without using XML Web services

It demonstrably is possible to connect direct from iOS to SQLServer, check out http://www.impathic.com/impathic/index.html
What does not currently seem to exist is a library to assist in implementing this. I'd love for somebody to prove me wrong!

It might be possible to use the FreeTDS library. I have used in the past for some test projects.
The only problem is the license, which might be incompatible with the App store, so creating an app which you want to distribute using the App store, won't be accepted.
If you would like, I can send you a little wrapper I wrote a year or two back.

Related

Can you use an iPhone as a web dev. server? [duplicate]

This question already has answers here:
iOS devices as web server [closed]
(4 answers)
Closed 1 year ago.
I am wondering if developing web services is possible using an iPhone as a web dev. server?
If so how?
You could try CocoaHTTPServer. This is an open source HTTP server for Mac/iOS.
It is cost effective and easy to run Raspberry Pi as production webserver simply because battery will not die, you can make cluster. iPhone as a web server is actually 7 years old idea, there is apps, News, video guides on YouTube.

Xcode 4 and Databases

I am new to programing iPhone applications.
I am pretty much done building the interfaces and I built a database using Visual Studio 2008.
Now I want to connect my application to that database using a SQL server as a web service (that acts as an intermediary layer between my application and database). I will reserve a server for the database later.
My question is: I have a log in a view where I ask for the username and password, how can I use the information from Xcode and send it to the database to verify it?
Your help will be very much appreciated.
From your description I am not sure if I understand, but if you need to have an app and some webservice with data you can check for example this tutorial from Ray Wenderlich:
http://www.raywenderlich.com/2965/how-to-write-an-ios-app-that-uses-a-web-service
Also, you might find useful this SO question:
iPhone app and web service

How to I connect an iPad directly to a MySQL Server? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
MySQL C API libraries for iPhone
I am making an iPad application that needs send and get information from a MySQL database. My boss refuses to use php on this project. I've looked everywhere and I cannot find a way to directly query and connect to a MySQL Database through an iOS application. Any help is greatly appreciated. Thanks in advance.
-Freddy
You need to build the MySQL client library for iOS, and link it into your project. These posts look helpful:
Build MySql client library for iPhone/iPad
Use the MySQL client library in iOS project

Can PhoneGap apps use server pages to load on it?

I am trying to do web apps using PhoneGap framework for iOS. I need to know whether PhoneGap loads page from server or not, I mean , can I use server side scripting language like php, pyhon, etc?
And if I used those scripting language, can I use phone native feature like camera?
Also for data storage there may be feature, I heard opendatabase can be used for online / offline database. Please anyone help me to figure out these things.
Waiting for good answer.
Thanks
Server side scripts cannot be loaded from within the app, however you can certainly call out to PHP, Python, etc running on a server from the app using AJAX, XHR, etc.
I gave an example in the question below:
How can get value in phonegap which is returned by php class?

How to Use PHP in IPhone Applications

I need to create an iPhone application using Facebook.
The facebook FBConnect API supports FQL which is similar to SQL Queries.
I would be able to create the application easily using PHP as compared to Objective-C.
So if there is any way to create an iPhone application using PHP please reply to me.
Thanks.
Well, if you are developing something for jailbroken devices , yes it is possible to use PHP (you have to install it first from Cydia).Also note that you should implement a SQLite database if your app/script needs database functionality (you can't run a MySQL server natively on iPhone ATM).
But, as pekka mentioned, this is a really bad idea, because you must set up first a lighttpd web server on iPhone (not really comfortable), or if you're planing to implement a CLI PHP script, you should first launch it (using some C functions like pipe(), dup2(), fork(), execl()) and then parse its output inside your -not-so-Objective-C- iPhone app.
So think it again...