Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
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?
Reply With Quote
  #2 (permalink)  
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,190
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
Reply With Quote
  #3 (permalink)  
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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Property access from Class within Partial Class zoltac007 C# 2005 0 December 1st, 2006 12: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 04:13 PM
Access to a property in the class. AyatKh ASP.NET 1.0 and 1.1 Basics 2 December 18th, 2003 10:25 AM
Project.Class.Property. ? Jstmehr4u3 VB How-To 4 June 11th, 2003 03:10 PM



All times are GMT -4. The time now is 05:21 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.