DataGridView

Using the Add new data source, when it came to Choose your Database object I chose a table called tbUsuaruio with 3 fields IdUsuario, Login and Senha, and A dataset Mala2Dataset containing the tbUsiario was created.
I Draged the Table in the format of a grid into the form.
the mala2DataSet.xsd together with the 5 standard components where created
Program work Ok.
with an InputBox I ask to enter a name (the field of login) and call the answer as Vuser.
I add Stored Procedure to the tbUsuarioTableAdapter and call it dp_fillbyLogin

CREATE PROCEDURE dbo.dp_fillbyLogin (      @Param1 varchar(16))
AS
      SET NOCOUNT ON;
SELECT        IdUsuario, Login, Senha
FROM            tbUsuario
WHERE        (Login = @Param1)

Now I have an Sql query Fill,GetData() which works and
FillBy,GetDataBy(@Param1).

My question is: After the DataGridView displays all registers, when I click the inputbox and get the Vuser I haveto use a query that acept the parameter and I do not see how to do it.

I believe that I should have some thing like:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim vuser As String
        vuser = InputBox("Enter your user name")
        Me.TbUsuarioTableAdapter.FillBy(Me.Mala2DataSet.tbUsuarioDataTable, param1 = vuser).............................
    End Sub

Appreciate  help
Dov Kruman
dovk179Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CodeCruiserCommented:
Did you try the above code?
0
dovk179Author Commented:
yes, I did

Dov
0
CodeCruiserCommented:
And the result was ...
0
dovk179Author Commented:
Ok, the problem was in the parameter properties, it as char. I changed it to varchar and it works like charm
thanks

Dov
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dovk179Author Commented:
by the comment I received I understood that it should work analyzing it a little more I concluded that I am trying to use small strings I a big  field size so I entered the parameter properties and sow that the parameter type was Char I changed it to Varchar and the problem was solved
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.