Reputation: 35605
A following question to this SO question
I'm using a SQL Server CE database included in the c# winforms project
The following does not work but if I amend the SQL string to
SELECT * FROM helloworld
then it does work. Why? Is there a full path that I could use
SELECT * FROM <blah>.<blah>.helloworld
?
using (var conn = new SqlCeConnection(ConfigurationManager.ConnectionStrings["DatabaseDGVexperiments.Properties.Settings.DatabaseDGVexperimentsConnStg"].ConnectionString))
{
conn.Open();
using (var myAdapt = new SqlCeDataAdapter("SELECT * FROM experiment.dbo.helloworld", conn))
{
DataSet mySet = new DataSet();
myAdapt.Fill(mySet, "AvailableValues");
DataTable myTable = mySet.Tables["AvailableValues"];
this.uxExperimentDGV.DataSource = myTable;
}
}
Upvotes: 1
Views: 386
Reputation: 35605
SQL CE doesn't have multiple schemas/catalogs like SQL Server (ref Thomas Levesque Jun 9)
Therefore no further information will ever be required in the FROM
clause
Upvotes: 1