SqlAdapter and Parameters

  • Thread starter Thread starter LS
  • Start date Start date
L

LS

I have a Windows Form (VS.NET 2003) that uses a SqlAdapter and a dataset
with 2 tables. 1 table is for a combobox and the other for a datagrid.

I want to trigger a dataset refresh on the datagrid table when the combobox
value is changed.

What is the easiest way to update the SqlAdapter parameter and then refresh
the dataset table?

I tried to update the parameter and issue a SqlAdapter.Fill(ds, "table"),
but it did not work.

Thanks,

Larry
 
In the combobox selected index change event:

With daHistory.SelectCommand.Parameters
.Item("@ContactID").Value = ContactID
End With

DsHistory1.Clear()
daHistory.Fill(DsHistory1, "tblHistory")
 
Back
Top