I am writing an indicator that uses the SQLCE functions to access a database. I created the windows forms project in visual studio, which is working, and then copied all the code to my NT indicator.
I'm using the same references in NT as in VS. My code for opening a table and filling a datagrid view is below. the line that appears to be failing is btaProjects = new DataTable();
It doesnt give any errors that I can see, either in the output window or the log, it just seems that it doesnt get past that line and no code after that is executed.
I had a search in the forum for examples, but couldnt find any, at least not for this version.
Can you help with this, or point me to any threads that have examples of using the SQL server compact edition, and which versions are supported?
thanks,
Will.
SqlCeConnection btaConn;
DataTable btaProjects;
SqlCeDataAdapter btaAdProjects;
BindingSource btaBdProjects;
btaProjects = new DataTable();
btaConn = new SqlCeConnection(btaConnectString);
btaConn.Open();
btaAdProjects = new SqlCeDataAdapter("Select * from backtestProjects order by name", btaConn);
btaBdProjects = new BindingSource();
btaAdProjects.Fill(btaProjects);
btaBdProjects.DataSource = btaProjects;
btaProjectsDatagrid.DataSource = btaBdProjects;
btaConn.Close();
Comment