Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Populating a datagrid using the selectedvalue of a combobox

Hi -

I'm having trouble populating a datagrid when a user selects an item. Nothing shows up in the grid and think it's because of my SQL statement joining two tables:

Const strSQL_SUPPLIER_SELECTED As String = "SELECT ProductID, ProductName, QuantityPerUnit, UnitPrice, " & _
"UnitsInStock, UnitsOnOrder, ReorderLevel, ProductDiscontinued FROM Products INNER JOIN Suppliers ON Products.SupplierID = Suppliers.SupplierID WHERE SupplierID = '"

I then have the entre SQL query as str_SQL_SUPPLIER_SELECTED & cboSuppliers.SelectedValue.ToString & "'"

When I debug it the SelectedValue is '18'. Any ideas?

Comments

  • ganesh4uganesh4u Member Posts: 68
    hi,
    Try same using flexgrid or mshflexgrid.i think datagrid shows problem when you try to use run time queries .
    Ganesh :)

  • kathydaffykathydaffy Member Posts: 2
    : hi,
    : Try same using flexgrid or mshflexgrid.i think datagrid shows problem when you try to use run time queries .
    : Ganesh :)
    :
    :
    Thanks! I'll try it and hope for the best... :)
Sign In or Register to comment.