Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exporting data in MSACCESS
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01192149
Message ID:
01205117
Vues:
22
>Dragan, maybe you can help me with this; it seems that FoxPro cannot seemingly handle the path when it gets to a space such as in "\Program Files", as follows:
>
>
>LOCAL lcMDBDir AS String, lcMDBName AS String, lnConnHandle AS String
>lcMDBDir = 'C:\Program Files\Star'
>lcMDBName = 'VFP2MDB.MDB'
>lnConnHandle = SQLSTRINGCONNECT('DSN=MS Access Database;DBQ='+;
>	lcMDBDir+'\'+lcMDBName+';DefaultDir='+;
>	lcMDBDir+';DriverId=25;FIL=MS Access;MaxBufferSize=2048;'+;
>	'PageTimeout=5;UID=admin;')
>
>#DEFINE c_Tab CHR(9)
>#DEFINE c_lbracket "["
>#DEFINE c_rbracket "]"
>#DEFINE CRLF CHR(13)+CHR(10)
>#DEFINE c_bufferlen 0x00010000
>#DEFINE C_SQUOTE [']
>tcAlias="PatWk"
>
>
>I only out part of the code, but the program totally bombs saying that it can't find the file, and I think it's because it freaks out over the "Program Files" folder part of the path in lcMDBDir. What do you think? Anyway, I can't seem to make this work unless the folder has no spaces in it. And I thought that by putting the path in between double quotes that that would make a difference, but it didn't.
>
>So, I'm stuck for now, but I'll keep hammering on this.

I would think that double quotes should resolve the problem, but you should put the whole string 'DSN=MS Access Database;DBQ='+ lcMDBDir+'\'+lcMDBName in double quotes. Did you try that? And, of course, here too DefaultDir='
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform