From: BlackSun on 28 Apr 2010 03:44 Hi, I have this working code which update a column: For Each rigaFF As DataRow In Me.dtSizeA.Rows For Each rigaTemp As DataRow In Me.dtSizeB.Select(String.Concat("Name = ", CStr(rigaFF(0)))) rigaTemp(18) = rigaFF(3) Next Next Is it possible to do the same with Linq? Thanks in advance for your help!!! Cheers, BlackSuna
From: Cor Ligthert[MVP] on 28 Apr 2010 05:36 AFAIK No. if you want to use Linq for SQL Server (not other ones) have a look to Linq to SQL or Linq to EF It is easy with Linq to SQL, just add a Linq to SQL item and go than to server explorer to select the tables like in AdoNet. DataContext SubmitChanges does than the update. (You can do normal Linq in a DataSet, but a dataset does not mean direct AdoNet) "BlackSun" <black_sun(a)email.it> wrote in message news:6fa7a31a-14d1-42ae-bc8a-596a2aad1a9b(a)r18g2000yqd.googlegroups.com... > Hi, > I have this working code which update a column: > > For Each rigaFF As DataRow In Me.dtSizeA.Rows > For Each rigaTemp As DataRow In > Me.dtSizeB.Select(String.Concat("Name = ", CStr(rigaFF(0)))) > rigaTemp(18) = rigaFF(3) > Next > Next > > Is it possible to do the same with Linq? > > Thanks in advance for your help!!! > > Cheers, BlackSuna >
From: Michel Posseth [MCP] on 28 Apr 2010 14:01 Yes you can update a dataset with Linq , just set a value to the entity HTH Michel "BlackSun" <black_sun(a)email.it> schreef in bericht news:6fa7a31a-14d1-42ae-bc8a-596a2aad1a9b(a)r18g2000yqd.googlegroups.com... > Hi, > I have this working code which update a column: > > For Each rigaFF As DataRow In Me.dtSizeA.Rows > For Each rigaTemp As DataRow In > Me.dtSizeB.Select(String.Concat("Name = ", CStr(rigaFF(0)))) > rigaTemp(18) = rigaFF(3) > Next > Next > > Is it possible to do the same with Linq? > > Thanks in advance for your help!!! > > Cheers, BlackSuna
|
Pages: 1 Prev: Math drawing question Next: string split by first occurens number |