# Tuesday, September 05, 2006

Relative path in web application connection string

I'm working on a ASP.NET 2.0 web application right now, which uses a Visual FoxPro database. I want the database to sit in the App_Data folder of my web application and I also want my connection string to use a relative path to access my database.

I found that SQL Express supports this, but the documentation suggests that it'll only work for the AttachDB value in a SQL Express connection string. Luckily this is not true. As shown in the sample below. The "|DataDirectory|" element can be used to point to the App_Data folder of your webapplication. I assume this will work for any database connection string.

<connectionStrings>

<add name="Develop-One.Framework.Properties.Settings.ConnectionString"

connectionString="Provider=VFPOLEDB.1;Data Source=|DataDirectory|UserData"

providerName="System.Data.OleDb"/>

</connectionStrings>

#    Comments [0] |
Tracked by:
"mediale affari" (mediale affari) [Trackback]
"jhonny depp" (jhonny depp) [Trackback]
"albergo bournemouth" (albergo bournemouth) [Trackback]
"midi colonna sonore" (midi colonna sonore) [Trackback]
"Steve Brock Ministries" (Steve Brock Ministries) [Trackback]
"MUSIC - Bethlehem Morning" (MUSIC - Bethlehem Morning) [Trackback]
"new york four seasons hotel" (new york four seasons hotel) [Trackback]
"PRODUCTS" (PRODUCTS) [Trackback]
"giochi carta regolamento" (giochi carta regolamento) [Trackback]
"PHOTOS" (PHOTOS) [Trackback]
"gioco scaricare gratis pc" (gioco scaricare gratis pc) [Trackback]
"MUSIC - Gloria" (MUSIC - Gloria) [Trackback]
"scuola superiore" (scuola superiore) [Trackback]
"perline gioiello" (perline gioiello) [Trackback]
"bionde masturbandosi" (bionde masturbandosi) [Trackback]
"amministratore condominiale" (amministratore condominiale) [Trackback]
"vacanza ad ischia" (vacanza ad ischia) [Trackback]
"MUSIC" (MUSIC) [Trackback]
"immagini disney" (immagini disney) [Trackback]
"Steve Brock Ministries" (Steve Brock Ministries) [Trackback]
"londra big ben" (londra big ben) [Trackback]
"PARTNERS" (PARTNERS) [Trackback]
"freddissimo gradito papa" (freddissimo gradito papa) [Trackback]
"HOME" (HOME) [Trackback]
"Steve Brock Ministries" (Steve Brock Ministries) [Trackback]
"gioco adulto gratis" (gioco adulto gratis) [Trackback]
"MUSIC - Mary Did You Know/What Child Is This?" (MUSIC - Mary Did You Know/What ... [Trackback]
"Steve Brock Ministries" (Steve Brock Ministries) [Trackback]
"l attimo fuggente" (l attimo fuggente) [Trackback]
"memory card" (memory card) [Trackback]
"Steve Brock Ministries" (Steve Brock Ministries) [Trackback]
"val d aosta" (val d aosta) [Trackback]
"calendario 2003" (calendario 2003) [Trackback]
"torte bindi" (torte bindi) [Trackback]
"OUTREACH" (OUTREACH) [Trackback]
"albergo firenze hotel" (albergo firenze hotel) [Trackback]
"SCHEDULE" (SCHEDULE) [Trackback]
"CONTACT" (CONTACT) [Trackback]
"pulcino fottilo nella residenza" (pulcino fottilo nella residenza) [Trackback]
"medio apparecchio" (medio apparecchio) [Trackback]
"nfl bowling bags" (nfl bowling bags) [Trackback]
"Pictures of Adderall" (Pictures of Adderall) [Trackback]
"candle set spa gift basket" (candle set spa gift basket) [Trackback]
"Stories Wife Threesome" (Stories Wife Threesome) [Trackback]
"distance learning missouri university" (distance learning missouri university) [Trackback]
"Vinyl Stone Siding" (Vinyl Stone Siding) [Trackback]
"Ozark real estate listing" (Ozark real estate listing) [Trackback]
"serious medical conditions" (serious medical conditions) [Trackback]
"viking ships" (viking ships) [Trackback]
"Hamster Care" (Hamster Care) [Trackback]
"money money money" (money money money) [Trackback]
"dunhill cufflinks" (dunhill cufflinks) [Trackback]
"oklahoma fraud examiner" (oklahoma fraud examiner) [Trackback]
"slip and fall injuries" (slip and fall injuries) [Trackback]
"agriturismo massa" (agriturismo massa) [Trackback]
"charter school curriculum" (charter school curriculum) [Trackback]
"ragazzo catanzaro" (ragazzo catanzaro) [Trackback]
"Red Sox Jokes" (Red Sox Jokes) [Trackback]
"international association of structural movers" (international association of s... [Trackback]
"xenadrine efx negative side effects" (xenadrine efx negative side effects) [Trackback]
"flagyl in breastfed baby" (flagyl in breastfed baby) [Trackback]
"cook crack cocaine in microwave" (cook crack cocaine in microwave) [Trackback]
"French marine archaeology and underwater pyramids" (French marine archaeology a... [Trackback]
"sONGWRITER AND PERFORMER" (sONGWRITER AND PERFORMER) [Trackback]
"dell drivers" (dell drivers) [Trackback]
"how to install hardwood floor" (how to install hardwood floor) [Trackback]
"Tamoxifen and ovarian cancer" (Tamoxifen and ovarian cancer) [Trackback]
"baal bot" (baal bot) [Trackback]
"gatlinburg pet friendly chalet cabin" (gatlinburg pet friendly chalet cabin) [Trackback]
"Examples of newsletters" (Examples of newsletters) [Trackback]
"tv guide" (tv guide) [Trackback]
"math help sites" (math help sites) [Trackback]
"saint louis missouri" (saint louis missouri) [Trackback]
"kern river rafting" (kern river rafting) [Trackback]
"CBL Activities for Math" (CBL Activities for Math) [Trackback]
"search engine positioning" (search engine positioning) [Trackback]
"web site design services" (web site design services) [Trackback]
"invisalign braces" (invisalign braces) [Trackback]
"birthday cake recipes" (birthday cake recipes) [Trackback]
"refrigerator handles" (refrigerator handles) [Trackback]
"Egyptian Accomplishments" (Egyptian Accomplishments) [Trackback]
"used toyota parts" (used toyota parts) [Trackback]
"metal mirrors" (metal mirrors) [Trackback]
"safety pad" (safety pad) [Trackback]
"cutieinglesesudore" (cutieinglesesudore) [Trackback]
"labyrinth door knocker" (labyrinth door knocker) [Trackback]
"independent films" (independent films) [Trackback]
"fibromyalgia trigger point injections" (fibromyalgia trigger point injections) [Trackback]
"hose crimper" (hose crimper) [Trackback]
"depuy outcomes registry" (depuy outcomes registry) [Trackback]
"fibromyalgia symtoms" (fibromyalgia symtoms) [Trackback]
"way to make money" (way to make money) [Trackback]
"high search engine ranking optimization" (high search engine ranking optimizati... [Trackback]
"cremaritardante" (cremaritardante) [Trackback]
"volorho" (volorho) [Trackback]
"search engine web optimization" (search engine web optimization) [Trackback]
"amiablefighettestrip" (amiablefighettestrip) [Trackback]
"new york morgage lenders" (new york morgage lenders) [Trackback]
"olioextravergine" (olioextravergine) [Trackback]
"smsmessaggio" (smsmessaggio) [Trackback]
"business plan online sportsbook" (business plan online sportsbook) [Trackback]
"deadly human viruses" (deadly human viruses) [Trackback]
"vacuumpump" (vacuumpump) [Trackback]
"spyware spyware remover" (spyware spyware remover) [Trackback]
"Scarface Window Blinds" (Scarface Window Blinds) [Trackback]
"Zocor generic" (Zocor generic) [Trackback]
"dana carvey snl" (dana carvey snl) [Trackback]
"Laser Treatment for Heel Spur" (Laser Treatment for Heel Spur) [Trackback]
"Symantec corporation" (Symantec corporation) [Trackback]
"Alcohol And Zocor" (Alcohol And Zocor) [Trackback]
"bay window vertical blinds" (bay window vertical blinds) [Trackback]
"bingo palace" (bingo palace) [Trackback]
"cash for my car now" (cash for my car now) [Trackback]
"the daily telegram obituaries" (the daily telegram obituaries) [Trackback]
"daggers and kunai knife" (daggers and kunai knife) [Trackback]
"cheat codes ps2" (cheat codes ps2) [Trackback]
"netherland dwarf rabbits" (netherland dwarf rabbits) [Trackback]
"cayon dweller" (cayon dweller) [Trackback]
"spy sweeper psguard" (spy sweeper psguard) [Trackback]
"dye producing gastropod" (dye producing gastropod) [Trackback]
"daffy us lpga" (daffy us lpga) [Trackback]
"dwayne kosiancic manitoba" (dwayne kosiancic manitoba) [Trackback]
"removing black hair dye" (removing black hair dye) [Trackback]
"daihatsu hijet oil filter" (daihatsu hijet oil filter) [Trackback]
"activites that can elevate your psa" (activites that can elevate your psa) [Trackback]
"rabbi marc dworkin" (rabbi marc dworkin) [Trackback]
"dxm extraction" (dxm extraction) [Trackback]
"warhammer dwarf organ gun rules" (warhammer dwarf organ gun rules) [Trackback]
"daily candy" (daily candy) [Trackback]
"4port 1u dvi i usb kvm switch 4x6ft cables incl" (4port 1u dvi i usb kvm switch... [Trackback]
"dcl 19 dvi lcd" (dcl 19 dvi lcd) [Trackback]
"daisy tattoos" (daisy tattoos) [Trackback]
"dva zivocisne druhy mp3" (dva zivocisne druhy mp3) [Trackback]
"the ballad of davy crockett" (the ballad of davy crockett) [Trackback]
"black dahia" (black dahia) [Trackback]
"zip a dee do dah" (zip a dee do dah) [Trackback]
"abe exodus on ps1 to buy" (abe exodus on ps1 to buy) [Trackback]
"samsung camcorder sdc103 mini dv" (samsung camcorder sdc103 mini dv) [Trackback]
"pse compound bows" (pse compound bows) [Trackback]
"dwemer user" (dwemer user) [Trackback]
"dairy heifer raising" (dairy heifer raising) [Trackback]
"dwarf korean lilac" (dwarf korean lilac) [Trackback]
"celluloid heroes ray davies" (celluloid heroes ray davies) [Trackback]
"jan hendriks kollen giethoorn" (jan hendriks kollen giethoorn) [Trackback]
"daintree" (daintree) [Trackback]
"lenox daffodil vase" (lenox daffodil vase) [Trackback]
"daigunder" (daigunder) [Trackback]
"kahrs wood floor doussie dakar" (kahrs wood floor doussie dakar) [Trackback]
"multi region dvd players" (multi region dvd players) [Trackback]
"hippo eats dwarf" (hippo eats dwarf) [Trackback]
Comments are closed.