Vb.net 在数组中存储读卡器项
有人能帮我处理一下Vb.net 在数组中存储读卡器项,vb.net,Vb.net,有人能帮我处理一下状态(索引)=myReader.Item(0),给出一个转换错误试试看 Dim myReader As OleDbDataReader Dim Index As Integer Dim status As Array Index = 0 cmd.CommandText = "SELECT CPALLOCATIONTIME from RECORDMASTER where ID='" & TxtID.Text & "'" cmd.CommandType = Comm
状态(索引)=myReader.Item(0)
,给出一个转换错误试试看
Dim myReader As OleDbDataReader
Dim Index As Integer
Dim status As Array
Index = 0
cmd.CommandText = "SELECT CPALLOCATIONTIME from RECORDMASTER where ID='" & TxtID.Text & "'"
cmd.CommandType = CommandType.Text
myReader = cmd.ExecuteReader()
Do While myReader.Read()
status(Index) = myReader.Item(0)
Index = Index + 1
Loop
myReader.Close()
If (Index = 2) Then
If ((status(0) = "Fp" Or status(0) = "Op") And status(1) = "OXp") Then
qText = TxtSTS.Text + "X"
Update = True
ApplicationStatus = 2
ElseIf ((status(0) = "Fp" Or status(0) = "Op") And status(1) = "FXp") Then
qText = TxtSTS.Text + "X"
Update = True
ApplicationStatus = 2
End If
列表(共T个)
。(有关确切语法,请参见。)DirectCast(myReader(0),字符串)
)或myReader.GetString(0)
李>
status(Index) = myReader.Item(0).ToString
Redim status(0) ' < -- declare like this
Redim preserve status(index)
status(Index) = myReader("Column_name")
index = index + 1