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

Physical Database not found

Status
Not open for further replies.

natncm70

MIS
Jan 16, 2002
66
0
0
IN
Hello,
I am getting error in ObjRpt.ReadRecords. The Error Message is "Physical Database not found". I am using Access Database for trial purpose. Please help me.

This is the code I am using


Dim strSystemPath
Dim strReportFile
Dim strConnectionString
Dim rsTemp
Dim strSql
Dim objApp
Dim objRpt

strSystemPath=Request.ServerVariables("PATH_TRANSLATED")
strSystemPath=Mid(strSystemPath,1,InStrRev(strSystemPath,"\"))


strConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strSystemPath & "BIBLIO.MDB;Persist Security Info=False"
strReportFile=strSystemPath & "Reports\Report2.rpt"

strSql="Select * from Authors"
Set rsTemp=Server.CreateObject("ADODB.Recordset")
rsTemp.Open strSql,strConnectionString
Response.Write(rstemp.fields(2))
If rsTemp.EOF and rsTemp.BOF then
Response.Write "No Data Found"
Response.End
End If

Set objApp = Server.CreateObject("CrystalRuntime.Application")
Set objRpt = objApp.OpenReport(strReportFile, 1)
objRpt.MorePrintEngineErrorMessages = False
objRpt.EnableParameterPrompting = False
objRpt.DiscardSavedData
objRpt.Database.SetDataSource rsTemp
objRpt.ReadRecords

Set session("oApp") = objApp
Set session("oRpt") = objRpt

If IsObject(session("oPageEngine")) Then
Set session("oPageEngine") = nothing
End If

Set session("oPageEngine") = session("oRpt").PageEngine
Set rsTemp=nothing
Viewer = "ActiveX"
If cstr(viewer) = "ActiveX" then
%>
<!-- #include file=&quot;SmartViewerActiveX.asp&quot; -->
<%
ElseIf cstr(viewer) = &quot;HTML Frame&quot; then
' Response.Redirect(&quot;htmstart.asp&quot;)
Else
' Response.Redirect(&quot;rptserver.asp&quot;)
End If
%>

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top