المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : how to pass parameters to an xsd dataset



C# Programming
08-25-2009, 12:40 PM
Hi,

I"m currently designing reports for my company (yeahhttp://www.barakasoft.com/script/Forums/Images/smiley_frown.gif ) and I'm trying to define my datasets using xsd files in VS 2008 design time. I'm creating table adapters and providing the select queries which in turn populates my tables. I need to know if there is a way for me to pass parameters to the queries that I use in those table adapters without having to resort to runtime code (In other words in design-time in the form of a placeholder of some sort) and at a later stage pass that parameter from another class instance.

In code you would do:
SqlCommand Cmd = ....;
SqlParameter par1 = new SqlParameter();
...//Set all the parameter properties
Cmd.Parameters.Add(par1);


I'll consider runtime code if it happens in the dataset's code behind file. My reporting solution (XtraReports) works quite well with xsd datasets and designing a report mostly in design time is far less time consuming than doing all the databinding in the code behind. Can anybody plz help?

Regards
Jacobus