|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Unbound Data AccessI 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. 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 On 23 Jan 2006 17:59:04 -0800, harry.verstan***@gmail.com wrote: Show quote >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. |
|||||||||||||||||||||||