I have a vb.net windows form project. I downloaded and installed SSCE. I created a database (sdf file) using Server Explorer in Visual Studio 2010 Pro. I was prompted to create a password for the database, so I did. Using the facilities of the GUI in VS2010, I created a dataset (xsd file in Solution Explorer) containing a TableAdapter for each table in the sdf file. But what I really need to do is run SQL queries against that database. So, I'm trying to create a connection object with a connection string for that database. I should be able to do this because the GUI did it when I created the xsd.
This is all on a laptop not connected to any network. After I installed SSCE, a new SQL Server appeared called SQLExpress (is that what CE does??)
I can't seem to find a way to create a connection string that doesn't blow up when it tries to run connection.open(). I've copied and pasted the connection strings from app.config. No good. I've tried this with the persist security info, without, with password, without, nothing works:
Public cnsATMDB As String = "Data Source=Peter-XPS17\SQLEXPRESS;initial catalog=|DataDirectory|\AvilaTimeManagementDB.sdf" providerName=System.Data.SqlServerCe.3.5; Password=<password>" ';Persist Security Info=True"
When the app runs connection.open() the error is: Invalid login for user "".
Any help would be appreciated, thanks!