This is a (simple, 5 minute) ASP.net 2.0/MSSQL 2005 question. I'd
prefer VB code but can do with C# if it's strictly copy-paste.
I've got a table in a database with a column called "exchangeRate".
Supposedly, the aspx form will fetch the first value of the field on
the table, when ordered by DESC period, and will multiply it times the
value input on a textbox by the user. It will then show the result and
thus modify the EURcash and USDcash values for this user's ID at
another table.
I've already got the following SqlDataSource and have tried to do it
with a variety of methods, but the fact is I'm completely lost and
think most approaches I've tried are terribly wrong.
< asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="< %$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [exchangeRate] FROM [market] ORDER BY [stage]
DESC">< /asp:SqlDataSource>
As an answer, I'd appreciate the code of a whole ASPX page that
includes both textboxes and connections to the database tables as
specified above, of course nothing fancy, but something that already
works so I can analyse it. |