How store sqlDataSource SELECT results in dataset?

V

VB Programmer

Asp.net 2.0...

I have an SqlDataSource on my aspx form. It's defined as...

<asp:SqlDataSource ID="sdsCoupons" runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT ShoppingCoupons.*, CouponCode AS Expr1 FROM
ShoppingCoupons WHERE (CouponCode = @CouponCode)">
<SelectParameters>
<asp:ControlParameter ControlID="txtCouponCode" DefaultValue="000"
Name="CouponCode"
PropertyName="Text" />
</SelectParameters>
</asp:SqlDataSource>

The SELECT statement get's it's value from a textbox field that the customer
fills in as you can see.

I want to "run" the SELECT statement and process the data returned by it. I
thought the easiest way would be to store the results of the SELECT into a
dataset and run thru it. Any ideas on how I can do it? Or, perhaps you
have a better way to do this...

Thanks!
 
V

Vijay

Take a look at the DataAdapater class.. that will help you store results in
a DataSet..

VJ
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top