I have a SQL Compact Edition Database that I update periodically (via web services).
The part where I write to the database is taking way too long. I am currently doing it with Linq to Datasets (as seen in this question). I have heard that if I do it with with SQLCeResultSet that it will work faster.
So, given that I have a table like this:
tblClient +- CLIENT_ID {Unique identifier} (Primary Key) +- CLIENT_NAME {varchar (100)} +- CLIENT_ACTIVE {bit}
And I have it in object that I get from my web services that look like this:
class Client
{
public Guid ClientID { get; set; }
public String ClientName { get; set; }
public bool Active { get; set; }
}
How would I get 100 Client objects into the database?
Updating existing rows and inserting rows that are not already in the database (determined by the primary key)?
Any example code would be great. I have an SqlCeConnection
, but nothing else.
Thanks for any help!