SqlServerCe

Post Reply
daoa80
Posts: 44
Joined: Fri Aug 10, 2012 8:50 am

SqlServerCe

Post 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.

User avatar
Russ C.
Posts: 213
Joined: Thu Nov 16, 2017 3:32 pm
Contact:

Re: SqlServerCe

Post by Russ C. »

Attached is an example project that connects to the internal database

This project was created in 2.40 SP3
Attachments
Date and Time Custom DataBase Viewer.zip
(28.85 KiB) Downloaded 444 times
Best regards,

Russ
(801) 708-6690
Technical Support
Contact Us

Beijer Electronics AB
http://www.beijerelectronics.us

Post Reply