How do I go about doing this?
+5
A:
You shouldn't.
Instead, you should make a web service that securely exposes the data you need.
(Do not write an ExecuteSQL
method!)
If you really want to connect directly to SQL Server from an iPhone, you'll need to write a TDS client; it will involve a lot of work.
By exposing the data through a web service, you add a layer of abstraction between the database and the client app, allowing you to change the database without breaking the app.
Also, exposing SQL Server directly to the internet is never a good idea.
Finally, remember that port 1433 might be blocked at a firewall.
SLaks
2010-05-21 03:03:46
Right, got it thanks!
hakewake
2010-05-21 04:24:41