hi i need to get the customer name from the user as in combo box when the user selets the user i want that selected customer name should be searched in the sql table (here table name is “obbalance “)and all the entries in the table having the name as the selected customer naem it should be shown in the data grid view
cmd.Parameters.Add(New SqlParameter("@p1", SqlDbType.NVarChar).Value = ComboBox1.SelectedItem.ToString)
cmd = New SqlCommand("select obbalance from balance where custname=@p1", con)
dr = cmd.ExecuteReader()
Form2.Show()
after thios also it shows a error plz can u help me out if the code is wrong den help me to
do correct it i am new to vb.net plz ……….
it shows error in declaration so can u send me any other code or if this code den plz send the correct code plz
Instead of doing this you can do this also
Why do you want parameterized query