问题描述
以前,我从未真正需要从vb.net Windows应用程序检索存储在非本地计算机上的任何数据,但是现在我必须这样做,并且我将学习如何做.因此,在我选择Google上的某个随机站点以学习实现此目标的方法之前,我想问一个问题,是否有人可以告诉我,或者将我链接到实现此目标的最佳方法.
看来这在VB.net表单应用程序中不起作用,而且我不认为这样,猜想这样做是否太不安全?
I have never really had to retrieve any data stored on a non-local machine from a vb.net windows application before, but now I have to, and I''m going to learn how. So my question before I pick some random site on google to learn a way to do this, I would like to ask if someone could tell and maybe link me to the best way to accomplish this.
It seems that this does not work in a VB.net form application, and I didn''t think it would, guess it''s too unsafe if it did?
Dim SQLCommand1 As New SqlClient.SqlCommand("SELECT Password FROM [AllUserData] WHERE UserName=''JakeCake'';", SqlConnection1)
SqlConnection1.Open()
MsgBox(SQLCommand1.ExecuteNonQuery())
SqlConnection1.Close()
通过快速浏览,我发现最常用的方法可能是通过某种方式将webControl与服务器托管的在线asp.net页面连接,然后通过该页面检索数据.如果这是唯一的真正方法,请提供链接或一些源代码
谢谢:)我很难找到有关此主题的好文章:doh:
顺便提一句.这是我的连接字符串(出于安全原因更改了FTP登录名
By taking a quick look, I found that the most used way might be to somehow connect with a webControl to an online asp.net page hosted by the server, and then through that page retrieve data. If this is the only real way to do it, please give a link or some source code
thank you :) I''m having a hard time finding a good article about this subject :doh:
btw. here is my connection string (ftp login changed for security reasons
Dim constring As String = "Data Source=msdb3.surftown.dk;Initial Catalog=Users;User Id=JakeCake;Password=secret123;"
推荐答案
这篇关于(VB.net表单)从联机SQL Server检索数据的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!