I cannot update data thru dataset&LINQ

S

Sergey Topychkanov

I have SQL SERVER 2008 Express and C# Express 2008 - both sp1.
I can remove and update data in my database only thru direct SQL query thru
database explorer,
but quite unable to do it through dataset and linq.
Thanks in advance
Sergey
 
N

Nicholas Paldino [.NET/C# MVP]

Sergey,

Well, what flavor of LINQ are you using? If you are just using LINQ and
updating DataSets, then you have to push the changed DataSet back to a
DataAdapter in order to persist the changes back to the DB.

Or are you using LINQ to SQL? It doesn't sound like you are.
 
K

Kuma

I have SQL SERVER 2008 Express and C# Express 2008 - both sp1.
I can remove and update data in my database only thru direct SQL query thru
database explorer,
but quite unable to do it through dataset and linq.
Thanks in advance
Sergey

If you are modifying the dataset by using linq to object you'll have
to commit the dataset's changes back to the database. If you use LINQ
to sql you won't have this problem.
 
S

Sergey Topychkanov

I think it's something with my SQL Server 2008 Express configuration.
Thanks in advance,
Sergey.

"Kuma" <[email protected]> Ñообщил/Ñообщила в новоÑÑ‚ÑÑ… Ñледующее:
I have SQL SERVER 2008 Express and C# Express 2008 - both sp1.
I can remove and update data in my database only thru direct SQL query
thru
database explorer,
but quite unable to do it through dataset and linq.
Thanks in advance
Sergey

If you are modifying the dataset by using linq to object you'll have
to commit the dataset's changes back to the database. If you use LINQ
to sql you won't have this problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top