I have a project in VB6 connecting to oracle 8.0 database. The form contains tab strip. The first tab strip contains many combo boxes displaying fields from various tables and the second tab contains Mhflexgrid displaying details froM a table. The data combos are filled with the respective values in the Form_Load using the following method :
dim rs as New ADODB.recordset
rs.open "select * from brand", connection, adopenstatic, adlockoptimistic
set datacombo.Rowsource = rs
datacombo.listfield = "NAME"
datacombo.Boundcolumn = "CODE"
When I double click on any row on the ,MHflexgrid, it should display the respective values in the combo boxes.
For this I open a record set and assign the value to the data combos as follows :
dim rs1 as New ADODB.recordset
rs1.open "select * from item", connection, adopenkeyset,
adlockoptimistic
datacombo.boundtext = rs1.Fields("code"
datacombo.refresh
The above code works perfectly but sometimes the data combo displays blank value. The value contained in rs1.Fields("code" is correct, but it does not assign that value to the data combo.
Please help
dim rs as New ADODB.recordset
rs.open "select * from brand", connection, adopenstatic, adlockoptimistic
set datacombo.Rowsource = rs
datacombo.listfield = "NAME"
datacombo.Boundcolumn = "CODE"
When I double click on any row on the ,MHflexgrid, it should display the respective values in the combo boxes.
For this I open a record set and assign the value to the data combos as follows :
dim rs1 as New ADODB.recordset
rs1.open "select * from item", connection, adopenkeyset,
adlockoptimistic
datacombo.boundtext = rs1.Fields("code"
datacombo.refresh
The above code works perfectly but sometimes the data combo displays blank value. The value contained in rs1.Fields("code" is correct, but it does not assign that value to the data combo.
Please help