Private Sub btncalc_Click(Sender,e)
a = val(txtConcode.Text)
b = val(txtConsumed.Text)
If a = 1 Then
Dim cmd as new mysqlcommand
cmd.connection = con
connect()
cmd.CommandText = "select Rate from tblrate where ConvertID=1"
dr = cmd.ExecuteReader
if dr.Read Then
q = dr.Read
end if
disconnect()
我想知道的是,我如何从我的 sql 查询中获取值并将其传输到变量 q 我刚刚创建了 dr 的东西