Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

i'm building a program wich have a search function.

the user fills in a value in a textbox and presses the button.

now the given value should pass to the select query

 

          string VAL;


           if (textBox1.Text != string.Empty)
           {
               VAL = textBox1.Text;
           }
           else
           {
               VAL = "%";

           }
         
         this.dBANBM_T075_BORGTOCHTTableAdapter.Fill(this.testdb1DataSet.DBANBM_T075_BORGTOCHT);

 

and the select query is:

WHERE (T075_BORGTOCHTNUMMER_1 LIKE ?)"

i use a acces database

but when i execute this he says that there is no value for the paratmeter

 

can anyone help me?

Edited by PlausiblyDamp
  • Administrators
Posted
You need to pass the VAL string into the query, if you are using the 2005 table adapter designer (and it looks like you are) then you can use a wizard to add a query to the adapter - give it your parameterised SQL as the source and it will generate a wrapper method that will allow you to pass the parameter in.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

I put down a new query with the select :

WHERE T075_BORGTOCHTNUMMER_1 LIKE ?

 

and the following fill command:

this.dBANBM_T075_BORGTOCHTTableAdapter.FillBy1(this.testdb1DataSet.DBANBM_T075_BORGTOCHT);

 

he return's me the error:

 

No overload for method 'FillBy1' takes '1' arguments

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...