p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

asp_components thread: Cpeaut32 error 800a5085

Message #1 by "hamesh Tiwari" <h_tiwari@h...> on Fri, 28 Mar 2003 13:54:58 +0530
Hai All !

    I've got report designed in Crystal reports 6 which I want to 

display through ASP .

    The problem is If I have to extract data from a single table the 

report is being displayed properly but If I am trying to extract data 

from multiple tables related heirarchically and I am mentioning the 

various joins in the session recordset to be passes to RPTSERVER then it 

gives an error

cpeaut32 error '800a5085'

Checking for data source changes failed.

The error is encountered when I'm giving readrecords with session(report 


The code which i'm using is as follows  :-



Set oConn =3D Server.CreateObject("ADODB.Connection")

   my_DSN =3D some dsn

   DBDSN =3D "DSN=3D"+some dsn+";uid=3Dsa;pwd=3Dsql"

   oConn.open DBDSN

set session("oRs") =3D Server.CreateObject("ADODB.Recordset")

session("oRs").ActiveConnection =3D oConn

q=3Dquery with multiple field select and multiple join condition

session("oRs").Open q

rs.Open q

reportname =3D some report

If Not IsObject (session("oApp")) Then

Set session("oApp") =3D Server.CreateObject("Crystal.CRPE.Application")

End If

Path =3D Request.ServerVariables("PATH_TRANSLATED")

While (Right(Path, 1) <> "\" And Len(Path) <> 0)

iLen =3D Len(Path) - 1

Path =3D Left(Path, iLen)


If IsObject(session("oRpt")) then

 Set session("oRpt") =3D nothing

 Set Rp =3D nothing

End if

Set session("oRpt") =3D session("oApp").OpenReport(path&reportname, 1)


set session("ParamCollection") =3D Session("oRpt").Parameterfields

set Database =3D session("oRpt").Database

set Tables =3D Database.Tables

'set Table1 =3D Tables.Item(1)

'set Table2 =3D Tables.Item(2)

'set Table3 =3D Tables.Item(3)

'set Table4 =3D Tables.Item(4)

'set Table5 =3D Tables.Item(5)

'set Table6 =3D Tables.Item(6)

'Table1.SetPrivateData 3, session("oRs")

'Table2.SetPrivateData 3, session("oRs")

'Table3.SetPrivateData 3, session("oRs")

'Table4.SetPrivateData 3, session("oRs")

'Table5.SetPrivateData 3, session("oRs")

'Table6.SetPrivateData 3, session("oRs")

On Error Resume Next


If Err.Number <> 0 Then

  Response.Write "An Error has occured on the server in attempting to 

access the data source"


  If IsObject(session("oPageEngine")) Then

   set session("oPageEngine") =3D nothing

  End If

set session("oPageEngine") =3D session("oRpt").PageEngine

End If



Please explain the problem and if any solution ASAP

  Return to Index