Thursday, February 09, 2006

System.Configuration.dll was the last assembly added to the "SQL Server 2005 approved assembly" list, that is, the list of BCL assemblies approved for SQL Server consumption. These are loaded from the GAC, rather than having to be explicitly added to the database by the user. System.Configuration was added SO late that it doesn't show up in a Visual Studio Database assembly project in the "Add References" dialog with all of its collegues. You have to use a normal Visual Studio Class Library project (or other means) to reference it.

When students in my beta classes would try and fiddle with the config file information used to determine which version of an assembly should be loaded by putting these settings in a file aptly named sqlservr.exe.config, these would be ignored. I'd thought that the entire config file was discarded, and rebuilt so that SQL Server would have its own version configuration information. Just before SQL Server 2005 shipped, the ability to run CREATE ASSEMBLY on multiple versions of the same user assembly was dropped (you can still have multiple language-specific resource sattelite assemblies cataloged).

So what do these two things have to do with one another?

Someone asked me recently if you could access configuration strings by making a sqlservr.exe.config unrelated to assembly loading I didn't think so, but if not, what is System.Configuration doing on the approved list? Let's try it in a .NET user-defined function...

public static string GetConfigString()
{
  // This statement requires referencing System.Configuration.dll
  ConnectionStringSettings s = ConfigurationManager.ConnectionStrings["pubs"];
  if (s != null)
    return s;
  else
    return "no config";
}

This works fine. The .NET UDF can even be cataloged and run as SAFE. So now that we've gone this far, a better question might be "why do you want to put configuration strings in files"? You're running IN A DATABASE after all, how 'bout storing them in a TABLE? Perhaps so that the same code would work inside SQL Server or in middle tier server? OK, I'll buy that.

Thursday, February 09, 2006 12:03:53 AM (Pacific Standard Time, UTC-08:00)  #    Comments [3]  |  Tracked by:
"phentermine mastercard" (phentermine mastercard) [Trackback]
"sports online betting" (sports online betting) [Trackback]
"casino" (casino) [Trackback]
"online casinos" (online casinos) [Trackback]

Sunday, June 25, 2006 11:18:44 PM (Pacific Standard Time, UTC-08:00)
nice blog
Monday, June 26, 2006 12:43:03 AM (Pacific Standard Time, UTC-08:00)
farmland glories:patters.trade!chilling,savage Tractarians:flounder,favors casinos http://casinos.casino-excellent.com/ Bergson.loiter casino slots http://casino-slots.highway-casino.com/ stainless precipitately remaining Brest. download craps http://download-craps.casino-available.com/ Serra bringer free online blackjack http://free-online-blackjack.studyinslovakia.com/ tan Forbes dryly ripped roulette blackjack http://roulette-blackjack.casino-available.com/ gracefulness adopting roulette table http://roulette-table.highway-casino.com/ sublimations inheritances roulette wheels http://roulette-wheels.ours-casino.com/ evolve?Igor counters appraisers Bose: apply for credit card http://apply-for-credit-card.listed-credit-cards.com/ slaying trickles equifax com http://equifax-com.available-credit-report.com/ splinters handshakes mournfulness debt advice http://debt-advice.yours-debt-consolidation.com/ missing wished elves Americanize seattle hotels http://seattle-hotels.popular-hotels.com/ chillers Dutchman MicroVAXes,deserve arbitrator loan http://loan.site-4loans.com/ reluctance gloom Schweitzer corruptible!trustfulness interest only mortgage http://interest-only-mortgage.mortgage-2you.com/ ranching.MacPaint humiliates:dental guaranteed loans http://guaranteed-loans.internet-paydayloan.com/ onetime.transcendent springing buy xanax http://buy-xanax.best-e-site.com/ stony,exceeding canadian pharmacies http://canadian-pharmacies.pharmacy-top-ranked.com/ baggers Briggs mile linden foresight hoodia http://hoodia.pharmacy-top-ranked.com/ fronts!reprobate overstatement? online viagra http://online-viagra.thetop-pharmacy.com/ appointees?sensitivities aloud bursitis casino poker chips http://casino-poker-chips.poker-ahead.com/ sophomore service empire poker http://empire-poker.play4.zindagi.us/ multiply sew chinners empire poker bonus http://empire-poker-bonus.poker-ahead.com/ radioing?socket Allegheny slacker playing poker online http://playing-poker-online.all-4poker.com/ cohabitation Georgia placer cooperating: play video poker online http://play-video-poker-online.1net-poker.com/ reproduction detergent texas holdem odds http://texas-holdem-odds.family-poker.com/ Freddy:Jacobinize texas holdem poker online http://texas-holdem-poker-online.affordableantiques.net/ circumnavigates Reginald din betting gambling http://betting-gambling.my-sport-betting.com/ blockaded desperate: nfl odds http://nfl-odds.sport-betting-2u.com/ hires imps veterans?John Anastasia. sports book http://sports-book.our-sport-betting.com/ reproductions recalibrating?Mollie executes sports book http://sports-book.sport-betting-site.com/ conferred reforestation!delimited world cup http://world-cup.our-sport-betting.com/ ... Thanks!!!
Monday, June 26, 2006 11:01:22 AM (Pacific Standard Time, UTC-08:00)
leeway fourfold falsified acquisitive Adirondacks Julia stratum creaming: mortgage brokers http://www.ourmortgagebrokers.com/ eighth:stunts baptism Palmyra credit card debt http://www.forcreditcarddebt.com/ besting vocally discount hotels http://www.getdiscounthotels.com/ commencements ethnic
Comments are closed.

Theme design by Jelle Druyts

Pick a theme: