Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word won't open DBF
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00916551
Message ID:
01081810
Vues:
27
Sorry but a PS is needed:
This allows me to use multiple data sources in one document. I can have "mergefields" reference one table and the {database} command reference a different table. Just wanted to be clear

>Marcia
>After 2.5 days of research I have fixed it. Microsoft should be slapped for making this so complicated. I know their were security issues but it should have allowed a local network that is not pushing anything on the web to use it like Word2000. The SubType variant does not apply to this use. I am sending this solution to you because you are more envolved in the community than I and can help some developer that now, probably has less hair than me, keep some of his hair. My solution:
>First there was an issue with a security window pop-up that needed a registry update;
[HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Options]
>"SQLSecurityCheck"=dword:00000000
>Second the database field insert option needed new parameters from what I was using including single back quotes and using the backlash with double-quotes.
>Original script:
>
>{DATABASE  \d "O:\\DirectoryName\\Data\\memodata.dbf"
>\c "DSN=FoxPro Files - Word;UID=;PWD=;
>SourceDB=O:\\DirectoryName\\Data;SourceType=DBF;
>Exclusive=No;BackgroundFetch=No;Collate=MACHINE;Null=Yes;Deleted=Yes;"
>\s "SELECT nproperty as '. Property Number .',
>     descrip as '.           Description                             .',
>     amt as '.    Cost    .', serialno as '.  Serial Number  .'
>FROM memodata.dbf ORDER BY `nproperty`" \l "2" \b "63" \h}
>
>Updated Script:
>
>{DATABASE  \d "O:\\DirectoryName\\Data\\memodata.odc"
>\c "Provider=VFPOLEDB.1;
>Data Source=O:\\DirectoryName\\Data;
>Mode=Share Deny None;Extended Properties=\"\";
>User ID=\"\";Password=\"\";Mask Password=False;Cache Authentication=False;
>Encrypt Password=False;Collating Sequence=MACHINE;DSN=\"\""
>\s "SELECT `nproperty` as '. Property # .',
>     `descrip` as '.          Description          .',
>     `amt` as '.  Cost  .',
>     `serialno` as '.  Serial Number  .'
>FROM `memodata`"  \l "2" \b "63" \h}
>
>This script can be created using the wizard in the insert database selection in the Database toolbar and inserting as a database field using a free table. This will ask you to say your "query" to and filename.odc file. The odc file is not static and can be place in any directory as long as the script is manually changed to point there. I use the mouse right-click on the table to "toggle field codes". This will change to the script and back to the table. Modify the source table and right-click the table in the doc, selecting "update fields" to see the new data. Now the doc will update programmatically.
>
>I hope I haven't left anything out. You or anyone can email me at chuck.j.williams@dep.state.fl.us for other info or clarafication. I hope this helps someone.
>
>Thanks, Chuck
>
>
>>Have you done any experomenting yet?
>>
>>No, sorry. But I did find this in MSDN if that is any help:
>>
>>Knowledge Base
>>
>>WD: Error Messages When You Try to Connect to a Mail Merge Data Source by Using the Mail Merge WizardPSS ID Number: 318532
>>
Extreme Programming = Plan -> Design -> Code -> Test
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform