p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   C# (http://p2p.wrox.com/forumdisplay.php?f=22)
-   -   Class building problem (http://p2p.wrox.com/showthread.php?t=46413)

ps_kaushik August 11th, 2006 06:48 AM

Class building problem
Hello Everybody,

         I am in a new problem. I have to build a class in c# which actually fetches all the columns of a table created in SQLServer as its property, So that in time of using the class we get all the cloulms of the table and we can assign values easily for inserting deleting and updating. This is a very normal practise.

      But my problem is that my table contains more than 50 columns and not only for one table but I have to build such class for 80 tables.Obvoiusly you can imagine the problem.If I have to define each property for each column name then I have to write 50*80 properties.... Unthinkable.

    In SQLServer syscolumns and sysobjects contains everything about all the tables and their columns.

   My question is that : is there a way out through which I can generate automatic property and add it to my class.

Any help is appriciated.

Thank you,



All times are GMT -4. The time now is 11:14 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.