DataGrid with OleDB

aschech

New member
Joined
Jun 7, 2004
Messages
2
Programming Experience
10+
I created a data adapter with a parameter using the wizard:
SELECT * from custactivity where client=?
In the properties window I defined the parameter except the Value which I supose to update at run time.
The datagrid I defined with datasource the data set corresponding to the data adapter. The datamember is the dataset and table.
At run time I defined the parameter as follow:
Dim par As New OleDbParameter("@client", OleDbType.WChar, 16)

par.Value = cbclient.SelectedValue

OleDbDataAdapter3.SelectCommand.Parameters.Add(par)


DataSet11.Clear()

Try

OleDbDataAdapter3.Fill(DataSet11, "custactivity")

Catch ex As Exception

MsgBox(ex.ToString)

End Try

Unfortunatelly the datagrid is empty.
Please let me know what I can do to fix the problem.
Thank you
 
Back
Top