Re: How can I pass parameter to Typed Dataset in VB.Net 2005?
- From: "Larry Lard" <larrylard@xxxxxxxxxxx>
- Date: 20 Mar 2006 04:07:05 -0800
Luqman wrote:
I have created a typed dataset and data adapter at design time in XSD File,
and created a parameter.
For example:
Select * from customers where CustomerID=@custid
Now how can I pass the parameter "ALFKI" at runtime.
I searched the internet which says,
myAdapter.SelectCommand.Parameters("@custid").value="ALFKI"
but there is no SelectCommand shows after myAdapter. ?
What am I missing ?
I am using VB.Net 2005.
In the visual Dataset Designer, right click the Customers tableadapter,
and choose Add | Query... and follow the wizard through, providing your
SQL statement where prompted. This will create methods named (by
default) FillBy and GetDataBy on the TableAdapter, which will take
arguments corresponding to the parameters in the SQL statement. There's
good examples in the documentation, I believe.
--
Larry Lard
Replies to group please
.
- References:
- Prev by Date: RE: XML to ODBC
- Next by Date: Re: Property DefaultValue
- Previous by thread: Re: How can I pass parameter to Typed Dataset in VB.Net 2005?
- Next by thread: Re: How can I pass parameter to Typed Dataset in VB.Net 2005?
- Index(es):
Relevant Pages
|