Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 11th, 2006, 06:48 AM
Registered User
 
Join Date: Mar 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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,

Kaushik



KS





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in Globals class pedroabs BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 8 June 12th, 2008 01:11 PM
Problem with class.......help Pettman ASP.NET 2.0 Basics 2 March 1st, 2006 03:51 PM
problem with using WebRequest class in C# anilkumarbv General .NET 0 December 28th, 2004 02:23 AM
Building a PHP Intranet Problem-Design-Solution kseba All Other Wrox Books 0 June 23rd, 2003 04:26 PM





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