Xander
Xander

Reputation: 932

Insert data into SQL Server CE for windows phone

I want to add some data to an empty database, this is my piece of code

private void readSQLCE()
{
    db = new MyDataContext("isostore:/qq.sdf");

    cust newcust = new cust
    {
        C_Id = 1,
        C_Name = "Amop",
        C_Place = "Poik"
    };

    db.CS.InsertOnSubmit(newcust);
}

What else is needed to add to this to insert my data into the SQL Server CE database?

Upvotes: 1

Views: 644

Answers (1)

Damian
Damian

Reputation: 4763

You'll need a

db.SubmitChanges();

Upvotes: 3

Related Questions