Results 1 to 4 of 4

Thread: DLLs registered wrong?

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    9

    Question DLLs registered wrong?

    Hello all,

    I'm a J2EE Developer. I'm rewriting an existing ASP/VB app into Java/JSP. But until then I've got the sad task of maintaining some shmucks old code. It's asp with a SQL Server backend. It also uses somehting like 5 dlls to generate reports in word and excel. I've got his web app up and running on IIS 6.0 (Server 2k3).

    The database connection is there and it's running the querries with no problem... but the report generation is where it craps out. It uses the asp to call a stored procedure which sends the data back to the asp with in turn passes it along to the dll to spit out the Excel Spreadsheet/Doc. I'm getting this error. (in this case the dll's name is SimpleExcel.dll)

    SimpleExcel error '800a01ad'
    ActiveX component can't create object

    C:\INETPUB\WWWROOT\IRMAI\IRMAI_V2\TRAVEL\../dataadmin/traveldump_process.asp, line 21

    I've done some research. His install documenation (which is incomplete and vague at best) says to use MTS to register the components. I'm not sure what this meant so I used the Component Services Manager to create a new app and register those dlls. Did not work, so I unregistered and then re-register them the only way I know how (regsvr32) but still same error. I googled it and read something about permissions on the dlls so I granted the GROUP EVERYONE full control... and still same.

    Did i just miss something in the MTS registering or ...gasp did this guy hard code something in his dlls? In that case shoot me in the foot.

    Can a Java Developer get some help from you Microsoft guys?
    Last edited by griffindj; Apr 25th, 2005 at 01:04 PM.

  2. #2

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    9

    Re: DLLs registered wrong?

    sorry guys, here's the code to the asp that gives the error

    the error line reads Exc.GenRpt 1, 1

    Code:
    <%
    vfiscalyear=Request.Form("fiscalyear")
    'reset flags
    error=false
    errorfiscalyear=false
    If Request.Form("action")="Excel Export" then
    	If vfiscalyear="" then
    		error=true
    		errorfiscalyear=true
    	end if
    	if error = false then
    		'build the report
    		sSQL = "sp_DumpTravel '" & vfiscalyear & "'"
    		set exceldump = db_recordset(sSQL)
    		if not exceldump.eof then
    		Set Exc = Server.CreateObject("SimpleExcel.RptWriter")
    			Exc.OutputFile = Application("PhysicalPath") & "ExcelRpts\TravelExport" & Session("UserID") & ".xls"
    			strFileVirtualPath = Application("VirtualPath") & "/ExcelRpts/TravelExport" & Session("UserID") & ".xls"
    			Exc.InputFile = Application("PhysicalPath") & "ExcelTemplates\Reports.xls"
    			Exc.SetParams CStr(Application("IRMADB_ConnectionString")), CStr(sSQL), "Reports"
    			Exc.GenRpt 1, 1
    			Set Exc = Nothing%>
    			<SCRIPT LANGUAGE=JAVASCRIPT>
    				var winvar;
    				winvar=window.open("<%=strFileVirtualPath%>","Report");
    				window.history.back(1)
    			</SCRIPT>
    			
    	<%end if
    	end if
    end if
    function resetform()
    	'reset form
    	vfiscalyear=""
    	voffice=""
    end function
    
    %>

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    9

    Re: DLLs registered wrong?

    here's the code to the vb function it calls. It's the last function it calls before pooping on itself

    Code:
    Public Function GenRpt(CurStartRow As Integer, CurStartCol As Integer)
        Dim i As Integer
        Dim sQueryString As String
        Dim sQuerySheet As String
        Dim sConnString As String
        Dim sResult As String
        Call SetupExcel
        For i = 1 To mcolQueryStrings.Count Step 1
            'Simple.OpenBook OutputFile
            sQueryString = mcolQueryStrings.Item(i)
            sQuerySheet = mcolQueryLocs.Item(i)
            sConnString = mcolConnStrings.Item(i)
            If sQueryString = "" Then
                sResult = "No Query specified for report."
                GoTo ErrHandler
            End If
            If sQuerySheet = "" Then
                sQuerySheet = i
            End If
            If sConnString = "" Then
                sResult = "No Connection String specified for report"
                GoTo ErrHandler
            End If
            'Test to see if Sheet exists (if not create it)
            If SheetExists(OutputFile, sQuerySheet) = False Then
                CreateSheet OutputFile, sQuerySheet
            End If
            Set connDB = CreateObject("ADODB.Connection")
            connDB.Open sConnString
            Set RS = connDB.Execute(sQueryString)
            RS.MoveFirst
            PrintHeadings OutputFile, sQuerySheet, CurStartRow, CurStartCol
            RS.MoveFirst
            CurStartRow = CurStartRow + 1
            PrintRecords OutputFile, sQuerySheet, CurStartRow, CurStartCol
            If AutoFitCols = True Then
                Autofit 8
            End If
            If MacroName <> "" Then
                RunMacro OutputFile, MacroName
            End If
            CloseBook OutputFile, True
            connDB.Close
            Set RS = Nothing
        Next i
        EmptyCollections
    ErrHandler:
        Set connDB = Nothing
        CleanUp
        GenRpt = sResult
    End Function

  4. #4
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704

    Re: DLLs registered wrong?

    you may want to try the VB6 section of the website - this is the .Net web server-side code technology forum.

    And good luck, you are now an official victim of 'dll hell'.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width