|
rsodimba
Starting Member
1 Posts |
Posted - 05/10/2012 : 08:46:11
|
Hi,
We are desigining a Web-Site, we are trying a pattren where we prepare the data transfer objects for the tables from ASP page and try calling insert statement by giving the column values. I want to put the insert statement in a single function and passing Transfer Object to this function and here i am giving Insert statement specifying the table name and column values
The bottle neck here is that, since for each table the number of columns will vary and so how can i use a single insert statement so that i can pass all the column values, i have arrived at some logic to get the table name to use, i am actually looking out for something like this
Save (DataTransfer dTO)
{ INSERT INTO TABLE1 VALUES( dTO.column1,...) }
Controller.Save(employeeTO)
Controller.Save(projectTO)
Please let me know if we can know this way...
Thanks,
Ravi Kiran.
|
|