Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help me understand?

Status
Not open for further replies.

mcauliff

Programmer
Feb 26, 2007
71
US
What is this statement doing? I new to ASP.

ac = oelookups.execute.Get_AC(phone,country).return_value;


I'm assuming that it executes a program named oelookups and a function Get_AC with the parameters phone and country. The return value will be place in the ac variable.

I have put response.write statements in the oelookups program, but they are not displayed.

In searching, I have found that there are other copies of the oelookups programs in different folders on the web server.

How do I ensure that it is using the right program? From the folder that I want.
 
1. The object stored in the variable named [tt]oelookups[/tt] has a public function or property named [tt]execute[/tt]

2. The [tt]execute[/tt] function or property returns an object.

3. The object returned in the previous step has a public function named [tt]Get_AC()[/tt] This function has two input arguments: [tt]phone[/tt] and [tt]country[/tt]

4. The [tt]Get_AC()[/tt] function returns either:
(1) an object with a public function/property named [tt]return_value[/tt] or
(2) a user-defined-type with an element named [tt]return_value[/tt]

5. The value of [tt]return_value[/tt] is stored in a variable named [tt]ac[/tt]




---------------------------------------

If this is confusing, think about the way you read values from an ADO recordset object. Most of the time you just do something like:
[tt]myValue = rst("TheField")[/tt]

But you could also write it out the long way:
[tt]myValue = rst.Fields.Item("TheField").Value[/tt]

1. The recordset object stored in the variable named [tt]rst[/tt] has a public property named [tt]Fields[/tt]. This property happens to be the default property of all recordset objects.

2. The [tt]Fields[/tt] property returns an ADO Fields object.

3. The Fields object returned in the previous step has a public function named [tt]Item()[/tt] This function happens to be the default property of the Fields object. This function has one input argument: [tt]Index[/tt]. In this example we pass the value "TheField" for the Index input argument.

4. The [tt]Item()[/tt] function returns an ADO Field object. Every ADO Field object has a default property named [tt]Value[/tt]

5. The value of [tt]Value_value[/tt] is stored in a variable named [tt]myValue[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top