Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot connect ADO data source to reports
Message
 
À
31/08/2002 10:22:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Divers
Thread ID:
00695306
Message ID:
00695900
Vues:
14
Hi Craig,

Thank you for your explanations and your precise details.


I wanted to announce that I do not use any more a recordset.

oConn = CREATEOBJECT("ADODB.Connection")
oConn.ConnectionString = " Provider=VFPOLEDB.1;Data Source=C: \eFox\Data\tastrade.dbc;Password=''"
oConn.Open() >> oRS = CREATEOBJECT("ADODB.RecordSet")
oRS.Open("Select * FROM Customer ", oConn)
oCR = CREATEOBJECT("CrystalRuntime.Application")


I connect my views by a DNS connection ( Ok , it will use ODBC) but not a recorset (?)

ocrystal changedataSource("Amline3.0 ", UPPER(ALLTRIM(aCursors[ 1 ])))

I cannot explain the reason but the resultat is faster 20% to 30% compared to the RECORSET...

Try :

Set Coverage To TESTRECORSET.txt
CODE with recordset
SET COVERAGE TO

Set Coverage To TESTDNS.txt
CODE with DNS
( cf sample http://www.msdcweb.com/downloads.htm )

FOR nX = 1 TO nItems

IF UPPER( ALLTRIM( .DATABASE.TABLES.ITEM( nX ).Location ) ) = cTableName
* WAIT WINDOW "Connection Serveur Ok " TIMEOUT 4
.DATABASE.TABLES.ITEM( 1 ).SetLogOnInfo(cNewODBC, "", "", "")
.DATABASE.TABLES.ITEM( 1 ).Location = cNewTableName
*WAIT WIND
lSuccess = .T.
EXIT FOR
ENDIF
ENDFOR


SET COIVERAGE TO
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform