Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create Crystal object
Message
De
30/01/2004 14:28:39
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Create Crystal object
Divers
Thread ID:
00872480
Message ID:
00872480
Vues:
61
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)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform