ASP.NET将数据传递到VB.NET客户端 [英] ASP.NET Passing Data To VB.NET Client

查看:173
本文介绍了ASP.NET将数据传递到VB.NET客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿-不能完全确定应该在(ASP.NET/VB.NET)的哪一部分,但是这里......
我正在尝试建立一个系统,以便可分发客户端连接到托管数据库的中央在线服务器.然后,客户端检索相关数据并将其显示在窗口中. (Access 2007)数据库已创建并成功托管(目前为localhost,IIS 7).使用ASP.NET将网页连接到本地数据库不是问题.

但是,我尝试了各种方法来使用VB,ADODB,SQL,ODBC等连接到客户端应用程序中的在线数据库.
就是说,我在搜索中看到某处可以设置一个ASP.NET页来检索数据,然后将其传递给客户端.我已经准备好了ASP.NET页面(我认为),但是如何与客户端连接呢?我不想打扰:

Hey - not entirely sure which section this should be in (ASP.NET/VB.NET), but here goes...
I''m trying to set up a system whereby a distributable client connects to a central online server which hosts a database. The client then retrieves the relevant data and displays it in the window. The (Access 2007) database has been created and is successfully being hosted (localhost for now, IIS 7). Connecting a web-page to a local database with ASP.NET isn''t a problem.

However, I''ve tried every which way to connect to an online database in the client-app with VB, with ADODB, SQL, ODBC etc.
That said, I read somewhere in my searching that it''s possible to set up an ASP.NET page to retrieve the data then pass it on to the client. I''ve got the ASP.NET page ready (I think), but how can this connect with the client? I''d prefer not to bother with:

Dim myAddress As String = "http://localhost/db/My_DB_Readout.aspx"
Dim UWebRequest As Net.HttpWebRequest
Dim UWebResponse As Net.WebResponse
UWebRequest = System.Net.HttpWebRequest.Create(myAddress)
UWebResponse = UWebRequest.GetResponse()
UFileReader = New System.IO.StreamReader(UWebResponse.GetResponseStream)


因为我需要双向访问-从数据库读取数据并向其中写入新数据或修改过的数据.
有什么想法吗?
预先感谢,
icemclean.


as I need two-way access - both reading from the DB and writing new or modified data to it.
Any ideas?
Thanks in advance,
icemclean.

推荐答案

客户端应用程序可以通过HttpWebrequest或XMLHttpRequest来获取它.数据将以xml的形式返回,然后可以由客户端进行解析.另一方面,您可以编写一个既可以处理Web应用程序又可以处理客户端应用程序的Web服务.

Google是您的朋友.

The client app can get it via either a HttpWebrequest, or an XMLHttpRequest. The data would come back as xml, and could then be parsed by the client. On the other hand, you could write a webservice that could handle both the web app AND the client app.

Google is your friend.


这篇关于ASP.NET将数据传递到VB.NET客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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