Using VS 2005, I've created a SQL Server Compact Version database, and filled a test table with data.
(Also to clarify, I HAVE installed SQL Compact Version and the tools)
I've dropped in a DataGridView onto my main form, created a new data source, and have even previewed the data.
However, no matter what I try, each time the app runs, in the form load event, this IDE generated call fails:
'TODO: This line of code loads data into the 'NewDataSet.TestTable' table. You can move, or remove it, as needed.
Me.TestTableTableAdapter.Fill(Me.NewDataSet.TestTable)
This is the error message: "The file name is not valid. Check the file name for the database. [ File name = |DataDirectory|\MyDatabase#1.sdf ]"
It's maddening! For good measure, I created a new data source and made sure to choose the proper location for the data file (which is in the main project folder btw), to no avail.
What's more, based on an MSDN article I saw, I even used the AppDomain.CurrentDomain.SetData() method to set the DataDirectory variable. Still, no dice.
If someone has an idea how to fix this, it would keep my head from exploding.