Page 1 of 1

SqlServerCe

Posted: Tue Jul 22, 2014 12:25 pm
by daoa80
Is it possible to write an SQL script (open + close connection, create statements, execute queries) and display the information on the screen instead of writing it to an excel report?

Need guidance on this matter.

Here is an example of what I'm doing.


SqlCeConnection conn = null;

try
{
conn = new SqlCeConnection("Data Source = Database.sdf; Password = ''");
conn.Open();

SqlCeCommand cmd = conn.CreateCommand();
cmd.CommandText = "INSERT INTO DataLogger1(Source_Address, SPN, FMI, Comments) values ('CDL', '23', '23', 'David');";
cmd.ExecuteNonQuery();

}
finally
{
conn.Close();
}


Thanks.

Re: SqlServerCe

Posted: Wed Jan 22, 2020 4:00 pm
by Russ C.
Attached is an example project that connects to the internal database

This project was created in 2.40 SP3