Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connection string format
Message
De
07/11/2008 18:43:58
 
 
À
07/11/2008 18:37:16
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01360597
Message ID:
01360628
Vues:
8
>>>>>>How do you format a connection string path when the data is in a folder under the app_data folder?
>>>>>>
>>>>>>I have
>>>>>>
>>>>>><add name="vfpRTP2" connectionString="Provider=VFPOLEDB.1;Data Source=|DataDirectory|2040sharedfiles\2040rtp.dbc" providerName="System.Data.OleDb"/>
>>>>>>
>>>>>>Which works when I run the form but fails when I configure the datasource.
>>>>>>
>>>>>>The problem seems to be with the folder delimiters. I have tried several combinations but can't find the right one.
>>>>>>
>>>>>>Thanks
>>>>>
>>>>>What is |DataDirectory| ?
>>>>>http://www.connectionstrings.com/?carrier=dbffoxpro
>>>>
>>>>Here is the full path on my development box: C:\Inetpub\wwwroot\RTP\App_Data\2040SharedFiles\2040RTP.dbc
>>>
>>>Try double slash
>>>C:\\Inetpub\\wwwroot\\RTP\App_Data\\2040SharedFiles\\2040RTP.dbc
>>>
>>>Does the ASPNET user have access to the folder with the DBC?
>>
>>I'm afraid you miss the point. The absolute path will work fine on my development box, but it will not be correct when I move it to the server. What I want is a relative path.
>
>I use the |DataDirectory| syntax when I publish the app. I have a different web.config to use for development or just keep commenting the keys back and forth.
>Tim

The DataDirectory syntax works fine on my dev box IF the DBC is directly under it. However in this case I'm another folder down and I can't quite seem to get it right.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform