473,763 Members | 7,611 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

dataadaptor.upd ate -one table only probem

daSeaInvInfo.Se lectCommand = New SqlCommand
daSeaInvInfo.Se lectCommand.Con nection = conSea
'daSeaInvInfo.T ableMappings.Ad d("Table", "InvoiceHeader" )
daSeaInvInfo.Se lectCommand.Com mandText = "select
number,companyn ame,issudate from invoiceheader "
daSeaInvInfo.Fi ll(dsSeaInvInfo , "invoiceheader" )
daSeaInvInfo.Se lectCommand.Com mandText = "select
number,item,uni tprice,noofunit frominvoicedeta il"
daSeaInvInfo.Fi ll(dsSeaInvInfo , "invoicedetail" )
............... ..

now, I only want to update "invoicehea der"
I process daSeaInvInfo.up date(dsSeaInvIn fo,"invoicehead er")
It gots error , it said it can't find the column "item" in the table
"invoicehea der" ???!!
i only want to update the "invoicehea der" only , but not the whole tables..
:
Please help !!!!
Nov 21 '05 #1
2 1377
Hi,

Maybe this will help.

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

Ken
--------------------
"Agnes" <ag***@dynamict ech.com.hk> wrote in message
news:uZ******** ******@TK2MSFTN GP12.phx.gbl...
daSeaInvInfo.Se lectCommand = New SqlCommand
daSeaInvInfo.Se lectCommand.Con nection = conSea
'daSeaInvInfo.T ableMappings.Ad d("Table", "InvoiceHeader" )
daSeaInvInfo.Se lectCommand.Com mandText = "select
number,companyn ame,issudate from invoiceheader "
daSeaInvInfo.Fi ll(dsSeaInvInfo , "invoiceheader" )
daSeaInvInfo.Se lectCommand.Com mandText = "select
number,item,uni tprice,noofunit frominvoicedeta il"
daSeaInvInfo.Fi ll(dsSeaInvInfo , "invoicedetail" )
............... ..

now, I only want to update "invoicehea der"
I process daSeaInvInfo.up date(dsSeaInvIn fo,"invoicehead er")
It gots error , it said it can't find the column "item" in the table
"invoicehea der" ???!!
i only want to update the "invoicehea der" only , but not the whole tables..
:
Please help !!!!

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

Maybe this will help.

http://msdn.microsoft.com/library/de...andbuilder.asp
Ken
--------------------
"Agnes" <ag***@dynamict ech.com.hk> wrote in message
news:uZ******** ******@TK2MSFTN GP12.phx.gbl...
daSeaInvInfo.Se lectCommand = New SqlCommand
daSeaInvInfo.Se lectCommand.Con nection = conSea
'daSeaInvInfo.T ableMappings.Ad d("Table", "InvoiceHeader" )
daSeaInvInfo.Se lectCommand.Com mandText = "select
number,companyn ame,issudate from invoiceheader "
daSeaInvInfo.Fi ll(dsSeaInvInfo , "invoiceheader" )
daSeaInvInfo.Se lectCommand.Com mandText = "select
number,item,uni tprice,noofunit frominvoicedeta il"
daSeaInvInfo.Fi ll(dsSeaInvInfo , "invoicedetail" )
............... .

now, I only want to update "invoicehea der"
I process daSeaInvInfo.up date(dsSeaInvIn fo,"invoicehead er")
It gots error , it said it can't find the column "item" in the table
"invoicehea der" ???!!
i only want to update the "invoicehea der" 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
3847
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 could resolve with a simple function: Example: I have 50records - I want to update a selection of the recods - some,
2
5266
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 user have to open a form and entera date so we know in report that the desiered check has been cleared. It takes me while to wrtie. But when I try to update the datagrid changes via dataset to MS Access 2003 I get an error that simply says...
27
2541
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 check these first:- <http://developer.irt.org/script/script.htm>
2
21383
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 with an UPDATE command as shown below in the un-commented code. I assume this is possible. The image is passed as a byte array called 'content'. I then want to update the column STREAM with the new 'CONTENT'.
5
3043
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 is hooked into a column ORGANISATION.SHORT_NAME) and a Button which I am using as a submit button.
13
7674
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, System.Web.UI.WebControls.DataGridCommandEventArgs e) TextBox temp temp=(TextBox)e.Item.Cells.Controls String str=temp.Text; str always returnt the old value of the cell (before being updated) would u plz tell me about whats wrong i m doin
4
1855
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 oledbcommandbuilder to supply the missing insert or update commands. The following shows how I'm creating my components: Private mdaCertByID As New OleDbDataAdapter 'selects a single cert by ID. .... mdaCertByID.SelectCommand = New OleDbCommand
9
1133
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
1202
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 DataAdaptor 'SqlDataAdapter1' and the DataConnection 'SqlConnection1' and they all seem to be connected correctly. But my data does not update. the dataAdaptor is configured for Insert/Update/delete and the datagrid datasource is...
3
1801
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 conn As New SqlConnection("server=TAYAL-B4029A1C2\SQLEXPRESS;database=sqlproj;Trusted_Connection=yes") Dim dslog As New DataSet() Dim dalog As New SqlDataAdapter("select * from UserSign", conn)
0
9564
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9387
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10148
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9938
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9823
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6643
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3528
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.