Connecting iPhone to an ODBC Database

安稳与你 提交于 2019-12-21 05:41:23

问题


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!


回答1:


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.




回答2:


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.




回答3:


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.




回答4:


WCF Data Services /w Entity Framework and the OData client library for iOS will give you full CRUD access to the schema.



来源:https://stackoverflow.com/questions/3510468/connecting-iphone-to-an-odbc-database

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!