locked
|DataDirectory| - minor issue SQLev RRS feed

  • Question

  • It seems that the |DataDirectory| macro is giving VS 2005 fits. It's a minor issue though and I've stumbled on it recently.

    The issue actually doesn't come up until you try to "add a new data source" to your project (after you've made the modification in your app settings/Project Properties to use the macro). So if you started of with ".\something.sdf" and then changed it to use the macro, things do run fine....until you try to add a new datasource (new database datasource)

    The error is: "Illegal characters in path" which is the pipe symbol.....

    While on this subject, here's a tip to those who maybe going through some debugging mysteries:

    Even if your sdf file is in your app "root" folder, if you debug, the file your app is actually working on is in the "\bin\debug\" folder. So it pays to create another connection in your Server Explorer to this file while debugging.

    I spent quite some time trying to figure out why my code didn't seem to be working and got even more frustrated since obviously no errors were reported. Turns out I was looking at the wrong db file....hope this helps...

     

    Monday, October 16, 2006 1:52 AM

Answers

All replies

  • Thanks for sharing the info.
    Monday, October 16, 2006 11:09 AM
  • Hi Sachin,

    No problem.

    It's a minor irritant at this time...although I don't recall having this issue previously (can't say for sure). The only thing different in my environment was the last "mega-patch" from Windows Update last week - is there a relationship?

    Cheers,

    Ed

    Monday, October 16, 2006 2:05 PM