SqlServerCe
Posted: Tue Jul 22, 2014 12:25 pm
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.
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.