|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Passing parameters to Data AdapterHi everyone,
I wrote the following code to pass a parameter value to the Data Adapter to fill in the dataset based on the parameter's value. SqlDataAdapter1.SelectCommand.Parameters("@last_name").Value = TextBox1.Text It works fine, but now I need to specify two parameters (last name and first name). How can I add the first name parameter in my code?? Thanks a million -- TS You can have multiple lines there:
SqlDataAdapter1.SelectCommand.Parameters("@last_name").Value = TextBox1.Text SqlDataAdapter1.SelectCommand.Parameters("@first_name").Value = TextBox2.Text Marcie On Fri, 15 Apr 2005 11:10:03 -0700, "TS" <T*@discussions.microsoft.com> wrote: Show quoteHide quote >Hi everyone, >I wrote the following code to pass a parameter value to the Data Adapter to >fill in the dataset based on the parameter's value. > SqlDataAdapter1.SelectCommand.Parameters("@last_name").Value = >TextBox1.Text > >It works fine, but now I need to specify two parameters (last name and first >name). How can I add the first name parameter in my code?? > >Thanks a million Thanks a lot, it worked.
Show quoteHide quote "Marcie Jones" wrote: > You can have multiple lines there: > SqlDataAdapter1.SelectCommand.Parameters("@last_name").Value = > TextBox1.Text > SqlDataAdapter1.SelectCommand.Parameters("@first_name").Value = > TextBox2.Text > > Marcie > > On Fri, 15 Apr 2005 11:10:03 -0700, "TS" > <T*@discussions.microsoft.com> wrote: > > >Hi everyone, > >I wrote the following code to pass a parameter value to the Data Adapter to > >fill in the dataset based on the parameter's value. > > SqlDataAdapter1.SelectCommand.Parameters("@last_name").Value = > >TextBox1.Text > > > >It works fine, but now I need to specify two parameters (last name and first > >name). How can I add the first name parameter in my code?? > > > >Thanks a million > > TS wrote:
> Hi everyone, SelectCommand.Parameters.Add(new > I wrote the following code to pass a parameter value to the Data Adapter to > fill in the dataset based on the parameter's value. > SqlDataAdapter1.SelectCommand.Parameters("@last_name").Value = > TextBox1.Text > > It works fine, but now I need to specify two parameters (last name and first > name). How can I add the first name parameter in my code?? > > Thanks a million System.Data.OleDb.SQLDbParameter("Name", System.Data.OleDb.OleDbType.Integer)) Chris
Why use a module instead of class?
An absence of IntelliSense in this situation Making trial version creating an array as property of a class Question about Namespaces and the Object Browser. Creating a custom log Hierarchal recordset disable items in CheckBoxList transparancy in vb.net Populating WinForms DataGrid |
|||||||||||||||||||||||