again i came for a problem. Please help me to do this. I was tried to get quantity from db make use of the selection in list box. I got answered with listbox1. If i selected the item in listbox1 the quantity would appear in textbox1. But in this same code will not work for listbox2 with textbox4.. Here i given the code...
$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
Here i got the error as "Conversion from type DBNull to type string is not valid" Plz let me know what will i do.??