facing problem in programming(update fields in tables)

  • Thread starter Thread starter Dhananjay
  • Start date Start date
D

Dhananjay

hi all,
I am facing problem in programming.Can anybody please let me know how
to solve the problem.
I have a link, clicking the link opens a page in which there are some
data which is coming from different tables(join realtionship). And
some data has to be inserted in that page(textbox)
In this page i have 2 buttons send and save. On clicking send button
the page content will be sent to the particular email-id. And on
clicking save button the page content has to go to
different tables and columns( i.e; the data will be saved into
tables). And some data has to be updated also. I don't think so that i
will be able to use update query(because of relationship)

Can any body please help me solve the problem.

Thanks in advance
 
Dhananjay said:
hi all,
I am facing problem in programming.Can anybody please let me know how
to solve the problem.
I have a link, clicking the link opens a page in which there are some
data which is coming from different tables(join realtionship). And
some data has to be inserted in that page(textbox)
In this page i have 2 buttons send and save. On clicking send button
the page content will be sent to the particular email-id. And on
clicking save button the page content has to go to
different tables and columns( i.e; the data will be saved into
tables). And some data has to be updated also. I don't think so that i
will be able to use update query(because of relationship)

Can any body please help me solve the problem.

Thanks in advance


See replies in dotnet.general, where you posted the same question. In
future, please don't multipost (send separate identical messages to multiple
groups). If you feel it necessary to ask the same question in multiple
groups, do so by crossposting (addressing a single message to more than one
group). Crossposting, to **a few** pertinent groups allows a single response
to be posted, automatically, to all groups to which you posted originally.
 
Make an explicit join. Updating through a 'relation' should be possible if
you keep the entities rather than using anonymous class. I suggest you take
a look at "Pro LINQ", by Joseph C. Rattz. As example, extracted from page
437, the following is claimed to be updatable:


var entites = from s in db.Suppliers
join c in db.Customers on s.City equals c.City into temp
from t in temp.DefaultIfEmpty()
select new { s, t };

foreach( var e in entities)
{
// do something with e.s and e.t
}




Sure, the database may refuse invalid updates.

On the other hand, the author specifically mentions that using an anonymous
object is not updatable:

var entities = from s in db.Suppliers
join c in db.Customers on s.City equals c.City into temp
from t in temp.DefaultIfEmpty()
select
{
SupplierName = s.CompanyName,
CustomerName = t.CompanyName,
City = s.City
}



Vanderghast, Access MVP
 

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

Back
Top