DataGridView, Stored procedure and a search textbox

  • Hi,

    Before you shoot me, I shud let u know Im a beginner in VB

    I set my DataGridView with the designer, pointed it to a stored procedure, which, worked, and this leaves me confused because I don't know how to do the next task..

    I have a textbox, with a button. When the button is clicked, the text inside textbox is sent to the sql stored procedure, results come back, how do I update the DataGridView, where do I stick in the sqlDataReader results inside the dataGridView? I'm aware it has to be via code, but hey, which API?

    Regards

  • they don't shoot newbies here, they help them

    I'm one too

    according to the MSDN library, create a BindingSource, point it to a DataTable (your dataset.Tables(0) will do quite nicely) and then set the BindingSource to mydatagridview.DataSource

    Dim bsMine as New BindingSource

    bsMine.DataSource = myDataSet.Tables(0)

    myDataGridView.DataSource - bsMine

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply