Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connection to a Visual FoxPro DBF file using Web.Config
Message
From
23/09/2007 08:21:53
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
01256112
Message ID:
01256141
Views:
14
>I have put my web-site together and everything works fine when working on my computer. I have one page that works with a Visual FoxPro table (dbf). In my web.config file, the only way to get it to find the table is to put in the complete path to the file. The file on my site is located in the App_Data folder off of the root of my web-site. Here is the connection string that works on my local computer when running under Visual Web Developer:
>
><connectionStrings><BR><add name="ADAInfoConnectionString" <BR>connectionString="Provider=VFPOLEDB.1;Data Source='C:\Users\David\Documents\Visual Studio 2005\WebSites\Damar\App_Data\adasurvey.dbf'"<BR>providerName="System.Data.OleDb" /><BR></connectionStrings>
>
>How can I get my ASP.Net application to find this table on my web-site?
>
>Any help would be much appreciated.
>
>Thanks!
>
>Dave :-)

Wouldn't you just change the path to match on server? You could put the file on a specific folder if you need to (remove filename (adasurvey.dbf)-it 's not actually part of connection string).
I never tried:
<connectionStrings>
  <add name="ADAInfoConnectionString"
     connectionString="Provider=VFPOLEDB.1;Data Source='~/App_Data'"
     providerName="System.Data.OleDb" />
</connectionStrings>
Might work or you may set it at runtime.

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform