开发者

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开发者_如何学C 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜