Connecting to SQL server via socket programming on iOS
Is it possible to execute quires to SQL ser开发者_StackOverflow中文版ver via socket programming in iOS?
You have four options:-
1 - Reverse engineer Microsoft's wire level sockets protocol. Probably man centuries worth of effort involved in this.
2 - Write a simple sockets server which can run on the SQLServer infrastructure to service your SQL requests. Doable - but "Simple Sockets Servers" dont really exist, it could get quite messy!
3 - Write a web service using one of the many frameworks for either REST or SOAP and access the data from within IOS via http request calls.
4 - Use the web service capability built into SQLSever since 2005. How Too
you could use http to access sql server.
http://msdn.microsoft.com/en-us/library/aa226553%28v=sql.80%29.aspx
Yes. SQL Server uses an open protocol called TDS. In fact the SQL Server Native Client is just implementation of a TDS client. You can read the spec here: http://msdn.microsoft.com/en-us/library/dd304523.aspx
精彩评论