472,791 Members | 1,009 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,791 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 1329
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> bl
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.