views:

100

answers:

1

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
Right, got it thanks!
hakewake