如何将SQL Server 2005/2008数据库中的数据查询到iPhone [英] How do i query data from SQL Server 2005/2008 databases to iPhone

查看:56
本文介绍了如何将SQL Server 2005/2008数据库中的数据查询到iPhone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图弄清楚如何在我的iPhone应用程序中利用现有的SQL数据库.

I am trying to figure out how to utilize exisiting SQL Databases with my iPhone apps.

我想做的是具有搜索功能.用户输入一个关键字,然后我将根据用户输入查询我的SQL数据库并从数据库返回结果.

What i am trying to do, is have a search function. The user inputs a keyword, i would then query my SQL database dependant on the user input and return the results from a database.

我该如何使用iPhone?

How do i do this with the iPhone?

我的意思是在线(远程)托管的SQL Server 2005/2008数据库.

I mean SQL Server 2005/2008 databases which are hosted online (remote).

谢谢

-迈克

推荐答案

您需要编写一个PROXY PROGRAM来做到这一点.您无法从iOS直接连接到SQLServer.

You need to write a PROXY PROGRAM to do that. You can't connect directly to SQLServer from iOS.

通过代理,我的意思是一个程序使用某种服务器端技术(IIS,ASP.NET,Java,C#)连接到SQLServer,并实现基于TCP/IP的协议(也可以是HTTP).

By proxy I mean a program using some kind of server side technology (IIS, ASP.NET, Java, C#) to connect to SQLServer, and implementing a TCP/IP based protocol (could be HTTP also).

在iOS端,您需要一个TCP/IP(或HTTP)客户端来执行对PROXY PROGRAM的请求.这些请求将以您可以发明的某种内部编码形式包含您要执行的SQL查询.当PROXY PROGRAM收到请求时,它会处理SQL查询并返回并发送结果,并再次以某种形式进行编码,iOS可以对信息进行解码和处理.

On the iOS side, you need a TCP/IP (or HTTP) client to perform requests to the PROXY PROGRAM. Those request will have the SQL query you want to do in some form of internal encoding you can invent. When PROXY PROGRAM receives a request, it process the SQL query and returns and send results based, again, encoded in some form iOS could decode and process the information.

这篇关于如何将SQL Server 2005/2008数据库中的数据查询到iPhone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆