2
我再次遇到問題。請幫助我做到這一點。我試圖從數據庫中獲取數量,利用列表框中的選擇。我用listbox1得到了答案。如果我在列表框1中選擇了該項目,數量將出現在文本框1中。但在相同的代碼不會與textbox4 listbox2工作..這裏我給出的代碼...錯誤:從DBNULL類型到字符串類型的轉換無效
$Con.open()
$Dim cd as new oledb.oledbcommand("Select Quantity from tlist where tool_name"& "'"listbox2.selecteditem & "'" & "", con)
$dim rs as oledb.oledbdatareader
$do while rs.read
$textbox4.text=(rs("Quantity))
$loop
$con.close
在這裏,我得到了錯誤的「從DBNull類型輸入字符串轉換是無效」 PLZ讓我知道我會做什麼。