1

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;
    }
}
Community
  • 1
  • 1
whytheq
  • 34,466
  • 65
  • 172
  • 267

1 Answers1

1

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

whytheq
  • 34,466
  • 65
  • 172
  • 267