473,395 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

dataadaptor.update -one table only probem

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 !!!!
Nov 21 '05 #1
2 1348
Hi,

Maybe this will help.

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

Ken
--------------------
"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:uZ**************@TK2MSFTNGP12.phx.gbl...
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 !!!!

Nov 21 '05 #2
Thanks MVP
"Ken Tucker [MVP]" <vb***@bellsouth.net> ¦b¶l¥ó
news:eX**************@TK2MSFTNGP10.phx.gbl ¤¤¼¶¼g...
Hi,

Maybe this will help.

http://msdn.microsoft.com/library/de...andbuilder.asp
Ken
--------------------
"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:uZ**************@TK2MSFTNGP12.phx.gbl...
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 !!!!

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Reply via newsgroup | last post by:
Folks, When performing an update in mysql (using PHP), can I find out how many records were matched? mysql_affected_rows() won't work... and I have the following problem that I thought I...
2
by: Niyazi | last post by:
Hi, I have not understand the problem. Before all the coding with few application everything worked perfectly. Now I am developing Cheque Writing application and when the cheque is clear the...
27
by: VK | last post by:
<http://www.jibbering.com/faq/#FAQ3_2> The parts where update, replacement or add-on is needed are in <update> tag. 3.2 What online resources are available? Javascript FAQ sites, please...
2
by: Tinius | last post by:
I am trying to update a field of type IMAGE. I am able to do this by deleting the record and then INSERTing a new record as shown below in the commented section. But I really want to do this...
5
by: Alastair Anderson | last post by:
I have created a very simple form with which I would like to update a single value in a single row of a database as a proof of concept. The relevant parts of the form are a DBWebTextBox (which...
13
by: abdoly | last post by:
i wrote a code to update datagrid with the datagrid updatecommand but i cant get the updated values after being update that is the code private void DataGrid1_UpdateCommand(object source,...
4
by: Jeremy | last post by:
My app is throwing an exception regarding trying to post a null to a required field. Examining the datarow in question, I see a valid date value. The row's state is "added" I'm relying on an ...
9
by: marcmc | last post by:
When I configure the dataAdaptor i get "Could not determine which columns uniquely identify the rows for TableName" and so the update and delete statements are not built.
1
by: marcmc | last post by:
My dataset is not updating my database after the user modifies the datagrid. I populate my data with the load sub below. In the Save Sub (below), I have generated my DataSet 'dataSet11' from my...
3
by: tayalamit7 | last post by:
Hey guys plzz help me in this , i am trying to delete row in database using disconnected architecture . it shows item deleted in datatable but does not delete in database here is my code Dim...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.