Re: How can I pass parameter to Typed Dataset in VB.Net 2005?

Tech-Archive recommends: Speed Up your PC by fixing your registry




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

.



Relevant Pages

  • Re: Sql Northwind DB
    ... Provide a SQL statement and sample result set that will ... list all Customers within the CA state. ... count the total orders for all Customers within the CA ... (Products INNER JOIN ((Employees INNER JOIN ...
    (microsoft.public.sqlserver.mseq)
  • Sql Northwind DB
    ... 1.Provide a SQL statement and sample result set that will ... count the total orders for all Customers within the CA ... Provide a SQL statement and sample result set that lists ...
    (microsoft.public.sqlserver.mseq)
  • Re: INSERT MAX(ID) Syntax problem
    ... Do the INSERT into Customers table. ... the Request.Form/Querystring collection and put it into an SQL Statement. ... : data type mismatch. ... I think it has to do with my quotes or double quotes on ...
    (microsoft.public.inetserver.asp.db)
  • Re: wrong test?
    ... It also depends if the customers table has an entry in it, ... FROM titles ... The SQL statement results in te customers table being updated with te ... The SQL statement results in two columns labeled identity and name ...
    (microsoft.public.dotnet.framework.aspnet)
  • Passing Criteria to SQL Statement
    ... email to those customers including an rtf file listing all records. ... to the SQL statement so it only creates a table for that specific customer. ... Dim MyRecs As Object ... "Advanced Shipment Notification", _ ...
    (microsoft.public.access.modulesdaovba)