General information
Title:
Create Crystal object
Hi all, I am trying to :
*connect to a server, *create Crystal runtime
*Log on Server *Open a report *Read records, etc.
*Log off server *disconnect
I do have the latest ver of ODBC p2sodbc.dll
When it runs, everything is "positive"
and the report even prompts me to enter parameter values.
That works fine, then down by the ReadRecords()
the ODBC driver manager says that my connection is
not open????? It was open.......
Am I doing things out of order? what?
Any help would be appreciated.
RELEASE ALL LIKE o*
LOCAL oCRW85 as CRAXDRT.Application
LOCAL oRpt85 as CRAXDRT.Report
LOCAL oDB as CRAXDRT.Database
LOCAL ocDB as CRAXDRT.DatabaseTables
LOCAL oDBT as CRAXDRT.DatabaseTable
xx = SQLSTRINGCONNECT("dsn=CSNDB02; uid=ORATEST1; pwd=password")
IF xx < 0
=MESSAGEBOX("Could not connect to server", 64, " Attention!")
RETURN
ENDIF
oCRW85 = CREATEOBJECT("CrystalRuntime.Application.8.5")
oCRW85.LogOnServer("p2sodbc.dll","CSNDB02","ORATEST1","ORATEST1","password")
oRpt85 = oCRW85.OpenReport("g:\code\con2000\CSN Sales.rpt")
oDB = oRpt85.Database()
ocDBT = oDB.Tables()
oDBT = ocDBT.item(1)
oDBT.SetLogOnInfo("just testing")
oRpt85.ReadRecords()
oCRW85.LogoffServer("P2sODBC.dll","CSNDB02","ORATEST1","ORATEST1","password")
=SQLDISCONNECT(xx)
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only