PC Review


Reply
Thread Tools Rate Thread

dataadaptor.update -one table only probem

 
 
Agnes
Guest
Posts: n/a
 
      7th Aug 2004
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 !!!!


 
Reply With Quote
 
 
 
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      7th Aug 2004
Hi,

Maybe this will help.

http://msdn.microsoft.com/library/de...andbuilder.asp

Ken
--------------------
"Agnes" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
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 !!!!



 
Reply With Quote
 
Agnes
Guest
Posts: n/a
 
      7th Aug 2004
Thanks MVP
"Ken Tucker [MVP]" <(E-Mail Removed)> ¦b¶l¥ó
news:(E-Mail Removed) ¤¤¼¶¼g...
> Hi,
>
> Maybe this will help.
>
>

http://msdn.microsoft.com/library/de...andbuilder.asp
>
> Ken
> --------------------
> "Agnes" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> 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 !!!!
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGrid / DataSet / DataAdaptor / DataBase update issue =?Utf-8?B?bWFyY21j?= Microsoft ADO .NET 13 16th May 2006 03:05 PM
DataAdaptor Bug! =?Utf-8?B?bWFyY21j?= Microsoft VB .NET 9 12th May 2006 05:32 PM
dataadaptor update --- confused Paul Microsoft ADO .NET 4 8th Jun 2005 05:49 PM
dataadaptor.update problem Jeremy Microsoft VB .NET 4 11th May 2005 02:44 AM
DataAdaptor.Update Mat Microsoft ADO .NET 2 30th Nov 2003 04:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:31 AM.