VB COM object causing web site to fail 
Author Message
 VB COM object causing web site to fail

All,

Help me please!

Here's the scoop.  I have written a COM object in VB 6.0 that goes out
to a SQL Server and grabs the list of jobs on the server.  The object
can also execute on of those jobs.  This is all done with the SQLDMO
library, etc.

Here's my problem.  I call this object from an ASP page sitting on a
corporate intranet.  The first time that I run the page, it executes
fine - no problem.  But something happens behind the scenes such that
any other page on the intranet is inaccessible - when I try going to
other pages, the browser window hangs.  Only when I shut down the
client browser and then open it up again am I able to see the other
pages on the intranet.  Someone suggested that it might be a memory
leak.  Does that sound reasonable?

Here's a snippet of code from the ASP page:
<%set oJobList = server.CreateObject("JobManager.JobList")
set rsJobList = oJobList.GetAllJobs("SQLSERVER01") 'returns a recordset
while not rsJobList.EOF
     'print list of jobs in a table
     rsJobList.MoveNext
wend
rsJobList.Close
set rsJobList = nothing
set oJobList = nothing%>

Here's some of the object code (references already set...):
Private m_rsJobs as ADODB.Recordset
Private m_oJob as SQLDMO.Job

Private Sub Class_Initialize()
set m_rsJobs = New ADODB.Recordset
set m_oSQLServer = New SQLDMO.SQLServer 'declared in global module
set m_oJob = New SQLDMO.Job
End Sub

Public Function GetAllJobs(ServerName as String) As ADODB.Recordset
'build field names
'...
m_rsJobs.Open
Call ConnectToSQLServer(ServerName)
For Each m_oJob in m_oSQLServer.JobServer.Jobs
'populate recordset with job info
Next

Set GetAllJobs = m_rsJobs

End Function

Sent via Deja.com
http://www.*-*-*.com/



Mon, 21 Jul 2003 06:50:52 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Call VB DLL or COM object from within VB COM object or EXE

2. VB Com Object Using Implements Fails In VBScript

3. com object will not read registry when com object called from asp (vb works fine)

4. Problem passing VB COM+ ASP Request object to .NET component System.Web.HTTPRequest through COM interop

5. Accessing the web server's Printer object from a VB6 COM object

6. Accessing the web server's Printer object from a VB6 COM object

7. CCReg.com - Accept Credit Cards On Your Web Site

8. CCReg.com - Accept Credit Cards On Your Web Site

9. Site Server COM objects

10. New works, CreateObject fails on COM EXE Object

 

 
Powered by phpBB® Forum Software