where to start?...
I'm connecting to an mySQL database using ODBC through the DataEnvironment. What i'm trying to do is populate a combobox with the Primary Key of one table {product}
(i can do this, bit) and populate a Datagrid with values from the other table {demand} that relate to this value. Which is where i'm getting stuck.
I have created a command in the dataenvironment, and a child command to filter by productCode but this requires setting at design time.
What i was hoping to do was to change the commandtext property of the command during run time, but am getting lost.
I was hoping i may be able to put something like this in the change event of the combobox:
sqlQry = "SELECT * FROM stockcalc.demand WHERE SKU =" & _
CInt(cboProdCode.Text)
DataEnvironment1.getSkus.CommandText = sqlQry
(getSkus being the command i created in data environment)
This, however doesn't cut it.
Can somebody please put me out of my misery???
C>
p.s. I'm a relative beginner at VB6, particularly with databases, so please...... assume nothing!
I'm connecting to an mySQL database using ODBC through the DataEnvironment. What i'm trying to do is populate a combobox with the Primary Key of one table {product}
(i can do this, bit) and populate a Datagrid with values from the other table {demand} that relate to this value. Which is where i'm getting stuck.
I have created a command in the dataenvironment, and a child command to filter by productCode but this requires setting at design time.
What i was hoping to do was to change the commandtext property of the command during run time, but am getting lost.
I was hoping i may be able to put something like this in the change event of the combobox:
sqlQry = "SELECT * FROM stockcalc.demand WHERE SKU =" & _
CInt(cboProdCode.Text)
DataEnvironment1.getSkus.CommandText = sqlQry
(getSkus being the command i created in data environment)
This, however doesn't cut it.
Can somebody please put me out of my misery???
C>
p.s. I'm a relative beginner at VB6, particularly with databases, so please...... assume nothing!