Home  |  Index  |  Dotnet4all Snippets  |  Submit resources
About  |  Mail us  
Dotnet4all Logo
Bound Data Class (Saturday, August 28, 2004)
 

Found the following interesting discussion in the Newsgroups:

Bound Data Class
by:stevekallal

I seem to remember that VB 6 had a way to bind a data class redirectly to an ADO recordset. Simply put, a the class could be populated with the recordset data without a lot of coding simply by using databinding.

Can this be done in VB .NET. I would like to write Data Classes and populate it from a DataSet.

Thanks in Advance!



 Reply:
by:Cor

 Hi Steve,

When you build everything using the designer it is very simple to do that by just binding the datataset "table" (watch that last) to the datasource (When that is a part of the control. It is by instance in the datagrid, the combobox and the datalist, however not in all controls).

Look for "datasource" in the properties

I hope this helps,

Cor


 Reply:
by:v-phuang@online.microsoft.com (Peter Huang)

 Hi Steve,

What do you mean a Data Class, is Cor's suggestion help you?

As far as I know, when you use drag an dataadapter into the project and generate a dataset, the dataset will have a class.
You can find its class definition under the Dataset1.xsd by clicking the Show All files button on the solution explorer.

If you need to add your customized member into a class which inherits from the class because each time you change the schema of the dataset, the class will be regenerated.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.



Posted by Xander Zelders



 
Previous Posts
    - Using a variable in an expression
    - How to hande events to control arrays
    - ArrayList subtract?
    - ComboBox class, CB_INSERTSTRING , VB.NET and marsh...
    - How to determine the size of a file in VB.NET
    - HttpWebRequest & Credentials
    - Synclock clarification
    - How to reference an embedded icon file
    - Returning Integer from String
    - Expiring the Page To discourage Browser BACK butto...

Archives
    - 08/01/2004 - 08/08/2004
    - 08/08/2004 - 08/15/2004
    - 08/15/2004 - 08/22/2004
    - 08/22/2004 - 08/29/2004
    - 08/29/2004 - 09/05/2004
    - 09/05/2004 - 09/12/2004
    - 09/12/2004 - 09/19/2004
    - 09/19/2004 - 09/26/2004
    - 09/26/2004 - 10/03/2004
    - 10/03/2004 - 10/10/2004
    - 01/02/2005 - 01/09/2005
    - 01/09/2005 - 01/16/2005
    - 01/30/2005 - 02/06/2005
    - 01/01/2006 - 01/08/2006


Disclaimer & Terms of Use  | DotNet4All.Com concept & © 2004 - 2007 by  Zelders²  - Holland