This whole thing with |DataDirectory| is a total PIA. I have tried and tried to get this right with little success. Additionally, all of the information I have found on it really doesn't ever fix the problem.

I like to keep my database in the bin\debug folder of a given project. So whenever I want to create a dataset (either by code or by wizard), the connection string in the project properties folder always shows

Code:
DataInformation|DataDirectory|\bin\debug
As soon as I use the dataset I get an error explaining that it cannot find the database in \bin\debug\bin\debug. Which is not surprising considering there is no bin\debug\bin\debug. It has been suggested that simply removing the \bin\debug from the correction string will remediate the problem... Not so much. Now when I want to bind the data to controls a new problem rears it's ugly head. telling me that

Code:
System.ArgumentException: 'Cannot bind to the property or column colSTaffID on the DataSource.
Parameter name: dataMember'
Now I cannot say 100% that this problem is caused by what I call BinDebug Blues (catchy name), but I am pretty sure it is related to that, since it I almost never see this error under other circumstances. I have been able to find out that |DataDirectory| is some kind of Macro in the appDomain. I know what a Macro is, but I have now idea what effect that has. There are instructions to make changes... My previous attempts to implement these suggestions that I find usually end up in a disaster that completely destroys everything I have done.

So, for a change, I thought it might be a good idea to reflect with those who might fully understand what is going on prior to destroying everything.

Personally, I would just like to have the full path defined and placed into the connection string and do away with |DataDirectory|, but that hasn't worked out so well for me either.