Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 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 June 11th, 2003, 11:03 AM
Authorized User
 
Join Date: Jun 2003
Location: Livermore, CA, USA.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Project.Class.Property.?

Ok. For instance ADO has
ADODB.RECORDSET.Field.Value

Adodb is the project, Recordset is the Class, Field is the property, what is Value? Sub Property?

I want to add a Size property associated to my Name Property inside my class. (So you get the . List in vb when you use the Name Property)

How do I do this?
 
Old June 11th, 2003, 11:07 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

you got something wrong in your thinking..

adodb is a class...
recordset is a class
field is a class
value is a property..

you can add any class to a class.. and you will see things like that...

HTH...

Gonzalo Bianchi
 
Old June 11th, 2003, 11:29 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Hudson, MA, USA.
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
Default

ADODB is a library (dll). A Recordset is a class defined in that library, and a Field is also a class in that library. There is no Field property or other such member with that name in the Recordset class. There is a Fields collection whose members are Field objects. Finally, the Field object has a Value property.

Thus, the reference might be:

ADODB.Recordset.Fields(1).Value

The Library/Dll name is optional as long as no other library referenced in the project has a Recordset Class. If there is, and thus:

Recordset.Fields(1).Value

is ambiguous, then the first library containing the object reference is the one that is used. This is why the Project References dialog has up and down buttons labeled 'Priority' - so the order can be changed if need be. It's probably better (IMO) to spell out the full reference in this case, though, as it is clearer which library is being used.

Jeff Mason
Custom Apps, Inc.
www.custom-apps.com




Similar Threads
Thread Thread Starter Forum Replies Last Post
Property access from Class within Partial Class zoltac007 C# 2005 0 December 1st, 2006 01:01 AM
Why no UserID property in the Membership class mega ASP.NET 2.0 Professional 0 August 16th, 2006 02:01 AM
Get all property values of class rrhandle ASP.NET 1.0 and 1.1 Basics 1 January 12th, 2006 05:13 PM
Access to a property in the class. AyatKh ASP.NET 1.0 and 1.1 Basics 2 December 18th, 2003 11:25 AM
Project.Class.Property. ? Jstmehr4u3 VB How-To 4 June 11th, 2003 03:10 PM





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