Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: SqlServerCe
PostPosted: Tue Jul 22, 2014 12:25 pm 

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

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


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron