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
%>
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
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'.