473,387 Members | 3,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Subclass problem w/ classic VBScript on IIS 5

I am working with Classes in classic VBScript on IIS 5.0 and am having a
problem wrapping my head around a solution.

I have a Class defining a record layout. (Bear with me here as I completely
roach the OOP language.) The objects are columns of the record and each
column is defined as its own Class.

The record layout class has a method called Column(str) that returns the
subclass's object. The subclass, in turn, has a Property Get (and a
corresponding Property Set) called Value. This allows me to make a
references like:

strField = objRecord.Column("mycolumn").Value

objRecord.Column("mycolumn").Value = strField
All that works fine and dandy.
The problem is getting a default behavior. I want to make the reference:

strField = objRecord.Column("mycolumn")

and retrieve Value from the subclass. What I get from IIS is "Object doesn't
support this property or method". I would expect that statement to trigger
the Property Get for the subclass.
Any ideas? Or am I just expecting too much from classic VBScript?
Oct 24 '05 #1
4 3518
> The record layout class has a method called Column(str) that returns the
subclass's object. strField = objRecord.Column("mycolumn")


If the method called Column is returning an object, then shouldn't you be
coding it like this:

set strField = objRecord.Column("mycolumn")

Brian

Oct 24 '05 #2

"Brian Staff" <brianstaff AT [NoSpam]cox DOT net> wrote in message
news:VA******************@bstaffw2k.jda.corp.local ...
The record layout class has a method called Column(str) that returns the
subclass's object.

strField = objRecord.Column("mycolumn")


If the method called Column is returning an object, then shouldn't you be
coding it like this:

set strField = objRecord.Column("mycolumn")


If I wanted to return the field as an object, yes. But I want only the Value
property and not the whole object. Since the statement I used as an example
is an assignment to a variable, and since objRecord.Column("mycolumn") is
the object that contains the Value, I want the default action of the
assignment's object to be Property Get Value rather than having to append
the Value property to each statement.
Oct 24 '05 #3
According to
http://msdn.microsoft.com/library/de...ropertyGet.asp
you should be able to use the "Default" keyword to indicate that Value is
the default property for this class...

--
Patrice

"MyndPhlyp" <no****@homeright.now> a écrit dans le message de
news:uB**************@tk2msftngp13.phx.gbl...

"Brian Staff" <brianstaff AT [NoSpam]cox DOT net> wrote in message
news:VA******************@bstaffw2k.jda.corp.local ...
The record layout class has a method called Column(str) that returns the subclass's object.
strField = objRecord.Column("mycolumn")


If the method called Column is returning an object, then shouldn't you be coding it like this:

set strField = objRecord.Column("mycolumn")


If I wanted to return the field as an object, yes. But I want only the

Value property and not the whole object. Since the statement I used as an example is an assignment to a variable, and since objRecord.Column("mycolumn") is
the object that contains the Value, I want the default action of the
assignment's object to be Property Get Value rather than having to append
the Value property to each statement.

Oct 25 '05 #4

"Patrice" <no****@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
According to
http://msdn.microsoft.com/library/de...ropertyGet.asp you should be able to use the "Default" keyword to indicate that Value is
the default property for this class...


Cool. That is exactly what I was looking for. Thanks.
Oct 25 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Keith | last post by:
I have been using ASP in it's VBScript form for some time, but I only tend to learn what I need to know as I need to know it, so I am by no means an expert and spend a lot of time on here asking...
22
by: Henry Rolf | last post by:
I need some advice. I was thinking about going with ASP.NET, but after reading this I don't think it would be right for me. http://www.powerasp.com/content/new/asp-and-aspdotnet.asp I have...
6
by: ASPfool | last post by:
Hello everyone, Please help me before I throw my computer out of the window: I'm working on a web application in classic ASP (vbscript), which is making calls to some webservices. The calls...
1
by: Marja Ribbers-de Vroed | last post by:
I'm using classic ASP with VBscript and I would like to have a facility for XML object serialization, just like the Serializer object that is available in ASP.NET. Is there such a thing for classic...
5
by: Kent.Gallinger | last post by:
I have a web application that contains asp.net and classic asp pages. I have a vb.net function that I would like to use in one of the classic asp pages. How can I do this? Can I do this? ...
5
by: joshbeall | last post by:
Hi All, I'm wondering if there is any way to access .NET assemblies from classic ASP/VBScript? We have a legacy app that was written using classic ASP and VBScript, and there's a new facility...
5
by: =?Utf-8?B?SmltIFJvZGdlcnM=?= | last post by:
My question is simple: How does one debug ASP Classic with Microsoft Visual Web Developer Express 2005 ("VWD")? Looming in the back of anyone's mind when you see a posting like this on any...
15
by: erik.oosterwaal | last post by:
Hi All, I have been developing websites in classic asp using VB script for a long while now. Due to the fact that I also took a detour to developing ColdFusion, and the fact the companies I...
1
by: jdub33 | last post by:
I have a web project that used a vb6 class library. The asp page would call a createobject() to access the class library. I recently updated the vb6 class library to .net2005. I unregistered the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.