Sql Server Compact Edition Data Access With The Sqlceresultset In Visual Studio 2013
I would like use the SqlCeResultSet like this tutorial in Visual Studio 2013. This is the code of my class Form1: private SqlCeConnection _conn; public Form1() {
Solution 1:
You missed step 24 in the tutorial - you need to open the connection:
SqlCeCommand cmd = new SqlCeCommand("SELECT [Employee ID], [Last Name], [First Name], Photo FROM Employees",_conn);
_conn.Open();
SqlCeResultSet resultSet = cmd.ExecuteResultSet(ResultSetOptions.Scrollable | ResultSetOptions.Updatable);
this.bindingSource1.DataSource = resultSet;
Post a Comment for "Sql Server Compact Edition Data Access With The Sqlceresultset In Visual Studio 2013"