dataadaptor.update -one table only probem

  • Thread starter Thread starter Agnes
  • Start date Start date
A

Agnes

daSeaInvInfo.SelectCommand = New SqlCommand
daSeaInvInfo.SelectCommand.Connection = conSea
'daSeaInvInfo.TableMappings.Add("Table", "InvoiceHeader")
daSeaInvInfo.SelectCommand.CommandText = "select
number,companyname,issudate from invoiceheader "
daSeaInvInfo.Fill(dsSeaInvInfo, "invoiceheader")
daSeaInvInfo.SelectCommand.CommandText = "select
number,item,unitprice,noofunit frominvoicedetail"
daSeaInvInfo.Fill(dsSeaInvInfo, "invoicedetail")
.................

now, I only want to update "invoiceheader"
I process daSeaInvInfo.update(dsSeaInvInfo,"invoiceheader")
It gots error , it said it can't find the column "item" in the table
"invoiceheader" ???!!
i only want to update the "invoiceheader" only , but not the whole tables..
:
Please help !!!!
 
Hi,

Maybe this will help.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadonet/html/commandbuilder.asp

Ken
--------------------
daSeaInvInfo.SelectCommand = New SqlCommand
daSeaInvInfo.SelectCommand.Connection = conSea
'daSeaInvInfo.TableMappings.Add("Table", "InvoiceHeader")
daSeaInvInfo.SelectCommand.CommandText = "select
number,companyname,issudate from invoiceheader "
daSeaInvInfo.Fill(dsSeaInvInfo, "invoiceheader")
daSeaInvInfo.SelectCommand.CommandText = "select
number,item,unitprice,noofunit frominvoicedetail"
daSeaInvInfo.Fill(dsSeaInvInfo, "invoicedetail")
.................

now, I only want to update "invoiceheader"
I process daSeaInvInfo.update(dsSeaInvInfo,"invoiceheader")
It gots error , it said it can't find the column "item" in the table
"invoiceheader" ???!!
i only want to update the "invoiceheader" only , but not the whole tables..
:
Please help !!!!
 

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