Link to home
Start Free TrialLog in
Avatar of SqueezeOJ
SqueezeOJFlag for United States of America

asked on

Need help accessing Stored Query

Hello,

I'm a VB.net beginner.  

My project has a Data Source called On_OrderDataSet which works great.  I'm able to access objects in this data source using code like this:
Dim dtCustomer As DataTable = On_OrderDataSet.Tables("Tbl_Customers")

Open in new window


So, I added a stored parameter-ized query, named Qry_Customers, using the Add option in the .xsd file.  Screenshot shows it.  Problem is that I can't figure out how to use Qry_Customers in my code.  I'd like to do something like:
Dim dtCustomer As DataTable = On_OrderDataSet.Queries("Qry_Customers")

Open in new window

 But it doesn't work.
User generated imageHow do I do fill a DataTable or DataRow object using Qry_Customers?  Code would be helpful.
Thanks,
Jason
ASKER CERTIFIED SOLUTION
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SqueezeOJ

ASKER

Thanks!

I simply recreated the "query" using the same SQL through the Add --> Table Adapter wizard in the .xsd area.