arghh
asked on
Asp Error: Server object error 'ASP 0177 : 80080005'
I get the following error when I try to view a microsoft access application report across our Intranet;
Server object error 'ASP 0177 : 80080005'
Server.CreateObject Failed
/mongoose/comShowRptDetail .asp, line 202
Server execution failed
...can anyone tell me what this is and how I get round it?
Thanks
Server object error 'ASP 0177 : 80080005'
Server.CreateObject Failed
/mongoose/comShowRptDetail
Server execution failed
...can anyone tell me what this is and how I get round it?
Thanks
check if the Component exists and is registered.
To check open "regedit"
and search for the progid.
Also post your code.
To check open "regedit"
and search for the progid.
Also post your code.
How are you fetching the report?.. simply open a connection string to the access database and select the records from the report like:
Set conn = Server.createObject("Adodb .connectio n")
conn.open"PROVIDER=Microso ft.Jet.OLE DB.4.0;DAT A SOURCE=db1.mdb;"
set rs = conn.execute("Select * from ReportName")
if rs.bof and rs.eof then
'no records
else
rs.movefirst
do while not rs.eof
response.write rs(0) & "<br>"
rs.movenext
loop
end if
Set conn = Server.createObject("Adodb
conn.open"PROVIDER=Microso
set rs = conn.execute("Select * from ReportName")
if rs.bof and rs.eof then
'no records
else
rs.movefirst
do while not rs.eof
response.write rs(0) & "<br>"
rs.movenext
loop
end if
ASKER
Here's all the code!...
I've checked all the permissions, they all seem ok.
************************** ***
<% Response.Buffer = True %>
<!--#include file="Connections/cnnMongo ose.asp" -->
<!--#include virtual="/mongoose/incDate AndHS.asp" -->
<!--#include file="incValidate.asp" -->
<%
' *** Empty temp table
Set comDelete = Server.CreateObject("ADODB .Command")
comDelete.ActiveConnection = strCNN
comDelete.CommandText = "DELETE * FROM ztblReports;"
comDelete.Execute
comDelete.ActiveConnection .Close
' *** Determine projects
strProjRef = Request.QueryString("strPr ojRef")
Set recProject = Server.CreateObject("ADODB .Recordset ")
recProject.ActiveConnectio n = strCNN
recProject.Source = "SELECT fldProjRef, fldProjName, fldProjMgr " _
& "FROM tblProjectMain " _
& "WHERE fldProjRef ='" & strProjRef & "';"
recProject.CursorType = 0
recProject.CursorLocation = 2
recProject.LockType = 3
recProject.Open()
recProject_numRows = 0
'Set string variables determining data.
strProjName = recProject.Fields.Item("fl dProjName" ).Value
strProjMgr = recProject.Fields.Item("fl dProjMgr") .Value
recProject.Close
recProject.ActiveConnectio n.Close
'Loop through project updates
Set recUpdates = Server.CreateObject("ADODB .Recordset ")
recUpdates.ActiveConnectio n = strCNN
recUpdates.Source = "SELECT fldUpdateRef, fldDTMStamp, fldStatus, fldSummary, fldIssues, fldProjCompletion " _
& "FROM tblUpdate " _
& "WHERE fldProjRef = '" & strProjRef & "' " _
& "ORDER BY fldDTMStamp DESC;"
recUpdates.CursorType = 0
recUpdates.CursorLocation = 2
recUpdates.LockType = 3
recUpdates.Open()
recUpdates_numRows = 0
'Set the count variable; Loop through the projects determining data.
intCount = 0
If (Not recUpdates.BOF) And (Not recUpdates.EOF) Then recUpdates.MoveFirst
While (Not recUpdates.EOF)
intCount = intCount + 1
'List Update Ref'
If intCount <> 1 Then strUpdateRefs = strUpdateRefs & "|"
strUpdateRefs = strUpdateRefs & recUpdates.Fields.Item("fl dUpdateRef ").Value
'List Update Ref'
If intCount <> 1 Then strUpdateDTMs = strUpdateDTMs & "|"
strUpdateDTMs = strUpdateDTMs & "#" & recUpdates.Fields.Item("fl dDTMStamp" ).Value & "#"
'List Update Status'
If intCount <> 1 Then strStatus = strStatus & "|"
strStatus = strStatus & "'" & recUpdates.Fields.Item("fl dStatus"). Value & "'"
'List Update Summaries
If intCount <> 1 Then strSummary = strSummary & "|"
strSummary = strSummary & "'" & recUpdates.Fields.Item("fl dSummary") .Value & "'"
'List Update Issues
If intCount <> 1 Then strIssues = strIssues & "|"
strIssues = strIssues & "'" & recUpdates.Fields.Item("fl dIssues"). Value & "'"
'List Update Projected Completion dates
If intCount <> 1 Then strDates = strDates & "|"
strDates = strDates & recUpdates.Fields.Item("fl dIssues"). Value
If recUpdates.Fields.Item("fl dProjCompl etion").Va lue <> Null Then
strDates = strDates & "#" & (recUpdates.Fields.Item("f ldProjComp letion").V alue) & "#"
Else
strDates = strDates & "Null"
End If
recUpdates.MoveNext
Wend
intTotal = intCount
recUpdates.Close
recUpdates.ActiveConnectio n.Close
'Populate the arrays
arrUpdates = Split(strUpdateRefs, "|")
arrDTMs = Split(strUpdateDTMs, "|")
arrStatus = Split(strStatus, "|")
arrSummary = Split(strSummary, "|")
arrIssues = Split(strIssues, "|")
arrDates = Split(strDates, "|")
'Set count again; loop through project ref array
intCount = 0
For intCount = 0 to intTotal-1
'Set string variable for values
strValues = "'" & strProjRef & "'," _
& arrUpdates(intCount) & "," _
& arrDTMs(intCount) & "," _
& "'" & strProjName & "'," _
& arrStatus(intCount) & "," _
& arrSummary(intCount) & "," _
& arrIssues(intCount) & "," _
& arrDates(intCount) & "," _
& "'" & strProjMgr & "'"
'Create INSERT statement
strSQLInsert = "INSERT INTO ztblReports(fldProjRef, fldUpdateRef, fldUpdateDTM, fldProjName, fldStatus, fldSummary, fldIssues, fldProjCompletion, fldProjMgr) " _
& "VALUES(" & strValues & ");"
'Execute the insert
Set comInsert = Server.CreateObject("ADODB .Command")
comInsert.ActiveConnection = strCNN
comInsert.CommandText = strSQLInsert
comInsert.Execute
comInsert.ActiveConnection .Close
Next
%>
************************** ***
I've checked all the permissions, they all seem ok.
**************************
<% Response.Buffer = True %>
<!--#include file="Connections/cnnMongo
<!--#include virtual="/mongoose/incDate
<!--#include file="incValidate.asp" -->
<%
' *** Empty temp table
Set comDelete = Server.CreateObject("ADODB
comDelete.ActiveConnection
comDelete.CommandText = "DELETE * FROM ztblReports;"
comDelete.Execute
comDelete.ActiveConnection
' *** Determine projects
strProjRef = Request.QueryString("strPr
Set recProject = Server.CreateObject("ADODB
recProject.ActiveConnectio
recProject.Source = "SELECT fldProjRef, fldProjName, fldProjMgr " _
& "FROM tblProjectMain " _
& "WHERE fldProjRef ='" & strProjRef & "';"
recProject.CursorType = 0
recProject.CursorLocation = 2
recProject.LockType = 3
recProject.Open()
recProject_numRows = 0
'Set string variables determining data.
strProjName = recProject.Fields.Item("fl
strProjMgr = recProject.Fields.Item("fl
recProject.Close
recProject.ActiveConnectio
'Loop through project updates
Set recUpdates = Server.CreateObject("ADODB
recUpdates.ActiveConnectio
recUpdates.Source = "SELECT fldUpdateRef, fldDTMStamp, fldStatus, fldSummary, fldIssues, fldProjCompletion " _
& "FROM tblUpdate " _
& "WHERE fldProjRef = '" & strProjRef & "' " _
& "ORDER BY fldDTMStamp DESC;"
recUpdates.CursorType = 0
recUpdates.CursorLocation = 2
recUpdates.LockType = 3
recUpdates.Open()
recUpdates_numRows = 0
'Set the count variable; Loop through the projects determining data.
intCount = 0
If (Not recUpdates.BOF) And (Not recUpdates.EOF) Then recUpdates.MoveFirst
While (Not recUpdates.EOF)
intCount = intCount + 1
'List Update Ref'
If intCount <> 1 Then strUpdateRefs = strUpdateRefs & "|"
strUpdateRefs = strUpdateRefs & recUpdates.Fields.Item("fl
'List Update Ref'
If intCount <> 1 Then strUpdateDTMs = strUpdateDTMs & "|"
strUpdateDTMs = strUpdateDTMs & "#" & recUpdates.Fields.Item("fl
'List Update Status'
If intCount <> 1 Then strStatus = strStatus & "|"
strStatus = strStatus & "'" & recUpdates.Fields.Item("fl
'List Update Summaries
If intCount <> 1 Then strSummary = strSummary & "|"
strSummary = strSummary & "'" & recUpdates.Fields.Item("fl
'List Update Issues
If intCount <> 1 Then strIssues = strIssues & "|"
strIssues = strIssues & "'" & recUpdates.Fields.Item("fl
'List Update Projected Completion dates
If intCount <> 1 Then strDates = strDates & "|"
strDates = strDates & recUpdates.Fields.Item("fl
If recUpdates.Fields.Item("fl
strDates = strDates & "#" & (recUpdates.Fields.Item("f
Else
strDates = strDates & "Null"
End If
recUpdates.MoveNext
Wend
intTotal = intCount
recUpdates.Close
recUpdates.ActiveConnectio
'Populate the arrays
arrUpdates = Split(strUpdateRefs, "|")
arrDTMs = Split(strUpdateDTMs, "|")
arrStatus = Split(strStatus, "|")
arrSummary = Split(strSummary, "|")
arrIssues = Split(strIssues, "|")
arrDates = Split(strDates, "|")
'Set count again; loop through project ref array
intCount = 0
For intCount = 0 to intTotal-1
'Set string variable for values
strValues = "'" & strProjRef & "'," _
& arrUpdates(intCount) & "," _
& arrDTMs(intCount) & "," _
& "'" & strProjName & "'," _
& arrStatus(intCount) & "," _
& arrSummary(intCount) & "," _
& arrIssues(intCount) & "," _
& arrDates(intCount) & "," _
& "'" & strProjMgr & "'"
'Create INSERT statement
strSQLInsert = "INSERT INTO ztblReports(fldProjRef, fldUpdateRef, fldUpdateDTM, fldProjName, fldStatus, fldSummary, fldIssues, fldProjCompletion, fldProjMgr) " _
& "VALUES(" & strValues & ");"
'Execute the insert
Set comInsert = Server.CreateObject("ADODB
comInsert.ActiveConnection
comInsert.CommandText = strSQLInsert
comInsert.Execute
comInsert.ActiveConnection
Next
%>
**************************
which create object fails?
ASKER
Helps if I post the right bit of code!
It fails on the Set objAccess = Server.CreateObject("Acces s.Applicat ion")....b it.
<%
Dim strNum, systime 'used to get the unique file name
Dim strDbName, strRptName, strWhere, strSnapFile, strFilter 'used with the Access objects
Dim objAccess 'MSAccess object
'Get a unique file name
'Get the reqd data from submitted Form
strDbName = "mongoose_ds.mdb"
strRptName = "rptDetail"
strSnapFile = strRptName & ".snp"
'Create instance of access. Visible is set to false b/c running as process, not desktop app'n.
Set objAccess = Server.CreateObject("Acces s.Applicat ion")
objAccess.Visible = False
'Open the database, then the Report, and output it in Snapshot format
objAccess.OpenCurrentDatab ase strDbName
With objAccess.DoCmd
'Open in preview mode so that where clause can be used (if neccesary)
.OpenReport strRptName, acViewPreview
'Save the report to snapshot format; Server.MapPath gets the current directory.
.OutputTo acOutputReport, , "Snapshot Format", Server.MapPath(".") & "\mongoose\snapfiles\" & strSnapFile
.Close
End With
objAccess.Quit acQuitSaveNone 'acQuitSaveNone
Set objAccess = Nothing
'HTML with the ActiveX plugin
If strSnapFile <> "" Then%>
<OBJECT id="SnapshotViewer1" width=622 height=500 codebase="file:///C|/WINNT /Profiles/ 7645/Deskt op/ASP%20i nfo/SCRIPT /Snapview. ocx"
classid="CLSID:F0E42D60-36 8C-11D0-AD 81-00A0C90 DC8D9" VIEWASTEXT>
<PARAM name="_Version" value="65536">
<PARAM name="SnapshotPath" value="snapfiles/<%=strSna pFile%>">
<PARAM name="Zoom" value="0">
<PARAM name="AllowContextMenu" value="-1">
<PARAM name="ShowNavigationButton s" value="-1">
</OBJECT>
<%
Else
Response.Write("<P><B>An error occured while attempting to produce your report.</B></P>")
End If
%>
....cheers
It fails on the Set objAccess = Server.CreateObject("Acces
<%
Dim strNum, systime 'used to get the unique file name
Dim strDbName, strRptName, strWhere, strSnapFile, strFilter 'used with the Access objects
Dim objAccess 'MSAccess object
'Get a unique file name
'Get the reqd data from submitted Form
strDbName = "mongoose_ds.mdb"
strRptName = "rptDetail"
strSnapFile = strRptName & ".snp"
'Create instance of access. Visible is set to false b/c running as process, not desktop app'n.
Set objAccess = Server.CreateObject("Acces
objAccess.Visible = False
'Open the database, then the Report, and output it in Snapshot format
objAccess.OpenCurrentDatab
With objAccess.DoCmd
'Open in preview mode so that where clause can be used (if neccesary)
.OpenReport strRptName, acViewPreview
'Save the report to snapshot format; Server.MapPath gets the current directory.
.OutputTo acOutputReport, , "Snapshot Format", Server.MapPath(".") & "\mongoose\snapfiles\" & strSnapFile
.Close
End With
objAccess.Quit acQuitSaveNone 'acQuitSaveNone
Set objAccess = Nothing
'HTML with the ActiveX plugin
If strSnapFile <> "" Then%>
<OBJECT id="SnapshotViewer1" width=622 height=500 codebase="file:///C|/WINNT
classid="CLSID:F0E42D60-36
<PARAM name="_Version" value="65536">
<PARAM name="SnapshotPath" value="snapfiles/<%=strSna
<PARAM name="Zoom" value="0">
<PARAM name="AllowContextMenu" value="-1">
<PARAM name="ShowNavigationButton
</OBJECT>
<%
Else
Response.Write("<P><B>An error occured while attempting to produce your report.</B></P>")
End If
%>
....cheers
Is Access installed on the machine??
CJ
CJ
problems with access, not there or not installed properly
ASKER
Access is there. And Access is running properly because we're using it for several other ASP pages (all of which work fine).
Any other idea's?
Any other idea's?
Dear expert(s),
A request has been made to close this Q in CS:
https://www.experts-exchange.com/questions/20497467/Please-delete-this-question.html
Without a response in 72 hrs, a moderator will finalize this question by:
- Saving this Q as a PAQ and refunding the points to the questionner
When you agree or disagree, please add a comment here.
Thank you.
modulo
Community Support Moderator
Experts Exchange
A request has been made to close this Q in CS:
https://www.experts-exchange.com/questions/20497467/Please-delete-this-question.html
Without a response in 72 hrs, a moderator will finalize this question by:
- Saving this Q as a PAQ and refunding the points to the questionner
When you agree or disagree, please add a comment here.
Thank you.
modulo
Community Support Moderator
Experts Exchange
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Some objects cannot be created independently. They must be created in the context of another object.