473,387 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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").valu e="ALFKI"

but there is no SelectCommand shows after myAdapter. ?

What am I missing ?

I am using VB.Net 2005.

Mar 20 '06 #1
3 12187
I forgot to inform that I am using Microsoft Access Northwind Database 2000.

"Luqman" <pe*******@cyber.net.pk> wrote in message
news:e7*************@TK2MSFTNGP09.phx.gbl...
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").valu e="ALFKI"

but there is no SelectCommand shows after myAdapter. ?

What am I missing ?

I am using VB.Net 2005.

Mar 20 '06 #2

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").valu e="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

Mar 20 '06 #3
Luqman,

Go to the solution explorere
Change in top the icon show all files to show all files.
Have than a look at your typed dataset in that and especially that with the
extention .vb
That is the Strongly Typed Dataset that the designer created

(In windowforms by the way)

I hope this helps,

Cor

"Luqman" <pe*******@cyber.net.pk> schreef in bericht
news:e7*************@TK2MSFTNGP09.phx.gbl...
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").valu e="ALFKI"

but there is no SelectCommand shows after myAdapter. ?

What am I missing ?

I am using VB.Net 2005.

Mar 20 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: | last post by:
Hi, I've defined an ObjectDataSource and a parameterized DataSet. I would like it if I could pass the parameter value that describes the query that creates the DataSet as part of a user control...
1
by: Justin Crossley | last post by:
I'm having a type mismatch problem when trying to pass a typed dataset to a web service. My code is: CLIENT CODE I have a dataset schema file called MainData.xsd containing a table called...
4
by: Ben | last post by:
So, at my place of employment, we use a national standard to transmit data between certain applications. This standard consists of a fixed width, flat file 4500-some-odd chars wide that contain...
1
by: Optimus | last post by:
Hi everyone, I currently develop an application in vs.net 2005 with vb.net. I was trying to use typed dataset and I've got in trouble for converting untyped dataset into Typed DataSet. I don't...
13
by: andrea | last post by:
Sorry for the stupid question, I know, but sometimes is necessary starts from the basic. I don't know how to pass the result of a method generated from a DAL class to a BL class returning the...
2
by: Deecrypt | last post by:
Hi, I'm a newbie to the Web Services topic. I have an ASP.NET website and am trying to send a Dataset from it to a WebService which should insert all the data from this DataSet to an Access...
3
by: Mike | last post by:
Hi, I'm delevloping a webservice that returns typed datasets with visual studio 2005. The problem is, that the typed data set in the client app is not the same as in the webservice. If I change...
8
by: Harry Strybos | last post by:
Visual Studio 2005 - SP1 - VB.Net on WinXP SP2 I add a typed dataset to my solution and get the following errors : Error 1 sub 'ReadXmlSerializable' cannot be declared 'Overrides' because it...
21
by: Peter Bradley | last post by:
Hi all, This post is sort of tangentially related to my earlier posts on configuration files for DLLs. Does anyone know how to create typed DataSets using VS2005's new DataSet designer, but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.