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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass Request ID from a class to an ASP page

Status
Not open for further replies.

DebbieC

Programmer
Mar 29, 2001
168
US
I can't figure out how to get the new Request ID from a Private Function in a class. It is called from a Public Function but only checks to see if it True.

This is the original code. I'm only including the pertinent code:

Code:
[b][u]process_scripts.asp[/u]
<include file = func_lib.asp>

errMsg = oRequest.ScriptDB[/b]

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

[b][u]func_lib.asp[/u]

public function ScriptDB()[/b]

If [b]obj.DBRequest[/b] = True Then
    'Response.Write "No problemo"
Else
    Response.Write obj.FailedMsg
End If

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

[b] [u]clsRequest[/u]

Public[/b] Function [b]DBRequest[/b] () As Boolean
	If [b]InsertRequest[/b] = False Then bComplete = False

[b]Private[/b] Function [b]InsertRequest[/b] () As Boolean
   	[b]m_RequestNumber[/b] = cmdDB.Parameters("Return").Value

This is what I tried and didn't work:

Code:
[b] [u]process_scripts.asp[/u]
<include file = func_lib.asp>

RequestID = oRequest.ScriptDB[/b]

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

[b][u]func_lib.asp[/u]

public function ScriptDB()[/b]

If [b]obj.DBRequest[/b] = True Then
    [b]iReqID = iRequestID[/b]
Else
    Response.Write obj.FailedMsg
End If

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

[b][u]clsRequest[/u]

Public[/b] Function [b]DBRequest[/b] () As Boolean
	If [b]InsertRequest[/b] = False Then
 	   bComplete = False
 	Else
 	   [b]iRequestID = m_RequestNumber[/b]
 	End If

[b]Private[/b] Function [b]InsertRequest[/b]() As Boolean
   	[b]m_RequestNumber[/b] = cmdDB.Parameters("Return").Value

This doesn't work. Can someone help me?


Thanks,
Debbie
 
Are all the variables declared as Public elsewhere ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Does any one else have any ideas to help me?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top