我在 vb.net 中制作了我的软件并将其与 MySQL 数据库连接,并使用 phpmyadmin 我创建了一个表更新和一个列版本。
在版本栏中,我插入了 version.txt 的链接
我希望我的更新库 updateVB 将从该表的数据库中获取 version.txt 的链接....
Updatevb1.checkforupdate("Text file where your version is stated (URL)",
"Current Version",
"URL of executable updater (SFX Archive),
"Username for FTP", "Password for FTP",
showUI As Boolean)
我想获取所有这些信息,例如:文本文件版本 URL、当前版本、可执行更新的 URL 等。
如何才能做到这一点?
conn = New MySqlConnection(ServerString)
Try
conn.Open()
Dim sqlquery As String = "SELECT FROM updater"
Dim data As MySqlDataReader
Dim adapter As New MySqlDataAdapter
Dim command As New MySqlCommand
command.CommandText = sqlquery
command.Connection = conn
adapter.SelectCommand = command
data = command.ExecuteReader
While data.Read()
If data.HasRows() Then
Dim vlink As String = data(1).ToString
Dim dlink As String = data(2).ToString
Dim ftpu As String = data(3).ToString
Dim ftpp As String = data(4).ToString
End If
End While
UpdateVB1.checkforupdate("vlink", "0.0.9", "dlink", "ftpu", "ftpp", showUI:=True)
data.Close()
conn.Close()