Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
rsodimba
Starting Member
1 Post |
Posted - 2012-05-10 : 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 thisSave (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. |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2012-05-10 : 09:40:06
|
| Try looking at the Microsoft Entity Framework.How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
|
|
|