Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Manipulation Through VFP
Message
 
À
10/08/1998 10:26:32
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00124749
Message ID:
00125251
Vues:
62
>Kevin,
>If you wrote as is, where is SQL ? And cSourcedb should refer to DBC not dbf.
>
cSourceDb = "SourceDB=C:\Program Files\vfp50\SAMPLES\DATA\Testdata.dbc"
>cSQLStatement = "SELECT recno() as rcno,* FROM customer"
>
>.InsertDatabase(35,511,0, ;
>	cDSN+cSourceDb+cSourceType+cOther, ;
>	cSQLStatement,,,,,,,1)
If you don't use DBC (free tables) then it would be like :
cDefDir = sys(5)+curdir()
>cDataFile = "mytable.dbf"
>cDataFullPath = dbf(cDataFile)
>cDSN = "DSN=FoxPro Files;DBQ="+cDefDir+";DefaultDir="+cDefDir+";"
>cSourceDB = ""
>cSourceType = ""
>cOther = "DriverId=536;MaxBufferSize=512;PageTimeout=5;"
>cSQLStatement = "SELECT * FROM "+cDataFile
>	.InsertDatabase(35,511,0, ;
>		cDSN+cSourceDb+cSourceType+cOther, ;
>		cSQLStatement,,,,cDataFile,,,1)
PS: Word expects excl access to source. For that reason in class a tempfile is created.
>Cetin


Thanks Cetin!

That did the trick! I was trying to use a DBF instead of a DBC as the source. I did it like your last example and it worked. The only problem is that it seems ALOT slower than MailMergeCreateDataSource. But hey, it works!

Thanks again.
Kevin Scott
kehvn@carolina.rr.com


Hey! It's not my fault. It's some General named Protection!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform