ObjectDataSource Parameters Adding

T

Tina

I have an .XSD tableadapter whose GetData takes an int.32 argument. I
created an ObjectDatasource that uses the .XSD to retrieve the data. When
creating the ObjectDataSource it recognized that an Int32 argument was
needed. but in the code I can't see how to specify the parameter to the
ObjectDataSource. I can't find an example anywhere.

I tried odsRFranOrder.SelectParameters.Add("OrderID", System.TypeCode.Int32,
orderid); where orderid is an int32 but I get an error saying that my
argument should be a string!! When I make it a string it blows at run time.

Help!
T
 
B

bruce barker

the parameter value must always be a string.

int orderid;

.......

odsRFranOrder.SelectParameters.Add(
"OrderID",
System.TypeCode.Int32,
orderid.ToString());


-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top