Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connection strings
Message
From
27/05/2008 20:05:28
 
 
To
24/05/2008 03:55:24
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
01319300
Message ID:
01319850
Views:
13
>>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
Its not a VFP app. Its my first .NET app using a VFP backend. I solved the problem by removing the extra quotes that the wizard put in there.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform