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

Properties not showing up in ASP

Status
Not open for further replies.

vasah20

Programmer
Feb 16, 2001
559
US
My properties aren't being returned in my ASP page. I've tried setting the return type to Variant, and also setting them to string, neither works. Any help?

Short example of my code:

VB COM:
Code:
'''''''''''''''''
'GET PROPERTIES
'resulting db stuff
Public Property Get DatabaseName() As String
    DatabaseName = gDBName
End Property
Public Property Get DatabaseLogin() As String
    DatabaseLogin = gDBLogin
End Property
Public Property Get DatabasePassword() As String
    DatabasePassword = gDBPW
End Property
'end resulting db stuff
''''''''''''''''''

Function DBStuff()
...
    'this line prints everything out perfectly.
    gResponse.Write "Database information:" & _
        &quot;New DB Name: &quot; & dbName & &quot;<br>&quot; & _
        &quot;Login: &quot; & &quot;b2c_&quot; & myDBLogin & &quot;<br>&quot; & _
        &quot;Login PW: &quot; & myDBPass & &quot;<br>&quot;
        
    'for the get properties
    gDBName = dbName
    gDBPW = myDBPass
    gDBLogin = &quot;b2c_&quot; & myDBLogin
   
End Function

ASP page

Code:
dim myobj
set myobj = server.createobject(&quot;vbdll.mydll&quot;)
myobj.dbstuff

'this line is always blank.
Response.write &quot;Name:&quot; & db.DatabaseName & &quot;<br>Login:&quot; & _
 db.DatabaseLogin

thx in advance.
leo

 
forget it - solved this one too.

turns out I was calling objectcontext.SetComplete, then trying to access the properties. By calling setcomplete, i erased everything that the component had.

I got around this by calling .setcomplete in the ObjectControl_deactivate, iff the boolean flag i created was set to true.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top