简体   繁体   中英

How would you connect to a Microsoft Access database sitting on a remote server through Objective-C?

I currently have an ASP page which I connect to from my Objective-C code, but I would like to know if any other method is possibly. I would like to just connect from the iPhone to the Access database without the ASP page. I have tried Googling this problem, but I did not find anything useful. Links to tutorials or code snippets would both be very helpful.

您应该编写一个将连接到数据库的webService,并且您的iPhone应用程序应该在理想情况下调用该webService。

I can't answer inline but my answer relates to Vaibhav Tekam's answer...
You should be able to find some sample code that will wrap an access database with a web service. Just search for "web service access database" and you should find some examples. The best practice is to expose only the data that you need through a simple set of methods. If you have students in your access database, you'll want a method for getStudentList and one for getStudentById(string studentId); Nonetheless, you cannot connect to an access database directly from an external device (its possible but not recommended). You should use JSON to send and receive the data between your app and the web service.

There is no class in Cocoa to communicate with an access database. If you are anticipating more than about 10 people using your app, then you should move to a database platform that supports higher concurrency.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM