Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trouble updating data using Crystal Reports Automation O
Message
De
24/09/1999 12:04:13
 
 
À
24/09/1999 10:52:05
Ken Zinssar
Newkirk Products Inc
Albany, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00268300
Message ID:
00268555
Vues:
24
>Craig,
>Here is a copy of my Visual FoxPro 5.0 program…
>
>clea
>*Create Crystal Report Writer application object
>LCrwApp=Createobject('Crystal.CRPE.Application')
>*Create Open report variable
>LCrwRep=LCrwApp.OpenReport("\\Dp__NT\Dp_Work\admin\xics\statemnt\fed_sup\Archive\A.rpt")
>*Create Database variable
>LcrwDat=LCrwRep.Database
>*Create Database Table variable
>LcrwTab=LcrwDat.Tables
>
>LcrwItem1=LcrwTab.Item(1)
>Lname=LcrwItem1.Name
>? Lname
>LcrwItem1.SetLogOnInfo("Visual FoxPro Tables","repplan")
>LB=LcrwItem1.TestConnectivity
>? LB
>
>*Create Database Table Item variable Again
>LcrwItem2=LcrwTab.Item(2)
>Lname=LcrwItem2.Name
>? Lname
>
>LcrwItem2.SetLogOnInfo("Visual FoxPro Tables","repsrc")
>LB=LcrwItem2.TestConnectivity
>? LB
>
>LCrwRep.DiscardSavedData
>Lver=LcrwDat.verify
>*Create Export Options of the Open report variable
>LCrwExp=LCrwRep.ExportOptions
>LCrwExp.FormatType=4
>LCrwExp.DestinationType=1
>LCrwExp.DiskFileName='\\Dp__NT\Dp_Work\admin\xics\statemnt\fed_sup\Archive\CCCrtf.rtf'
>LCrwRep.Export(.f.)
>
>The first error message reads: “ODBC error[Microsoft][ODBC Visual FoxPro Driver]SQL: ‘Column ‘Name1’ is not found.”
>(Column Name1 is the first field from repplan used in the report)
>The second error message immediately following the first reads: “OLE IDispatch exception code 20527 from CPEAUT32:SQL server error”
>I have also tried adding this line early on....
> LCrwApp.LogonServer("p2sodbc.dll","")
>I appreciate your help

See my reply to you in THREAD#268509
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform