Unbound Data Access

H

harry.verstandig

I am having a problem with asp.net 2.0 that I did not have with 1.1. In
C# code behind, I want to read data via a GetData(int productID) class
to obtain several columns of data from one row of one table in a Sql
2000 database which I need to calculate some values needed to be
inserted into another table. I obtain the parameter (key field) from a
value attribute in a list box on the .aspx page but I can't figure out
what code to use in the calling method to simply pass that parameter to
the GetData() class, and have the required data returned so I can drop
the values into my vars. All the available literature seems to focus on
the new data bound controls. Any help appreciated.
 
M

Mary Chipman [MSFT]

Instead of attempting this in client code, have you considered
creating a stored procedure to handle the problem? You pass the PK to
the sproc, which performs the computations and inserts the data into
the other table. I'm assuming that the other table exists in the same
database or on the same server.

--Mary
 

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

Top