Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connection strings
Message
De
24/05/2008 03:55:24
 
 
À
23/05/2008 18:17:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
01319300
Message ID:
01319325
Vues:
20
>The Following connection string setting works.
>
><connectionStrings>
>  <add name="VFPLibrary" connectionString="Provider=VFPOLEDB.1;Data Source = '"c:\inetpub\wwwroot\aspxtest\app_data\library.dbc"'" providerName="System.Data.OleDb"/>
></connectionStrings>
>
>but this one does not.
>
><connectionStrings>
>  <add name="VFPLibrary" connectionString="Provider=VFPOLEDB.1;Data Source='"|DataDirectory|library.dbc"'" providerName="System.Data.OleDb"/>
></connectionStrings>
>
>The latter is supposed to provide for relative pathing to the data but produces an error that says the file or path is invalid. Can someone show me the correct syntax for a relative path in the connection string?

What are you trying to accomplish? -
since the ODBC driver does not know anything about the current CurDir() in your application at runtime, you may need to send a fullpath anyway I think.

IOW, it looks to me as if you are reading the connection string from an XML config in your code, so that your code might be able to transform the relative path that it read into a fullpath() in a second step?
Why do you use ODBC to connect to a VFP backend from a VFP app?


hth
-Stefan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform