473,387 Members | 1,517 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,387 software developers and data experts.

table structure - wrong columns being called

hi.

ive 3 tables in my access database file. table people [column name "cust"] to
table sales [column name "cus2] is a one to many relationship, and the same
goes for Table sales [column name "salesinv"] and Table receipt [column name
"sinv2"].

i find that in my initial dataset (ds) everythings fine - the rows are
properly linked and displayed in my datagrid. however when i clear the
dataset and the data relations and then try to load only particular rows in
my second form, the program seems to be creating a nonexistent column "cus2"
for my table receipt, and it insists that it wont update my new row for table
receipt properly because:

System.InvalidOperationException : Missing the DataColumn "cus2" in the Data
Table 'receipt' for the Source Column "cus2"
at System.Data.Common.DbDataAdapter.Update(DataRow[] DataRows,
DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataSet [] dataset, String
srcTable)

cus2 was never part of receipt. its a column in sales. however in the same
event handler im able to properly add a record for the sales table.

what do i do please? why is this happening?

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...b-net/200608/1

Aug 22 '06 #1
1 1022
Hi,
>dataset and the data relations and then try to load only particular rows in
my second form, the program seems to be creating a nonexistent column
"cus2"
is the "my second form" a typo, or an existing form. If it is the second
table, than I cannot understand it either, but better than now.

Cor
"L&G via DotNetMonster.com" <u16975@uweschreef in bericht
news:65234fa3ce22d@uwe...
hi.

ive 3 tables in my access database file. table people [column name "cust"]
to
table sales [column name "cus2] is a one to many relationship, and the
same
goes for Table sales [column name "salesinv"] and Table receipt [column
name
"sinv2"].

i find that in my initial dataset (ds) everythings fine - the rows are
properly linked and displayed in my datagrid. however when i clear the
dataset and the data relations and then try to load only particular rows
in
my second form, the program seems to be creating a nonexistent column
"cus2"
for my table receipt, and it insists that it wont update my new row for
table
receipt properly because:

System.InvalidOperationException : Missing the DataColumn "cus2" in the
Data
Table 'receipt' for the Source Column "cus2"
at System.Data.Common.DbDataAdapter.Update(DataRow[] DataRows,
DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataSet [] dataset, String
srcTable)

cus2 was never part of receipt. its a column in sales. however in the same
event handler im able to properly add a record for the sales table.

what do i do please? why is this happening?

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...b-net/200608/1

Aug 22 '06 #2

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

Similar topics

36
by: toedipper | last post by:
Hello, I am designing a table of vehicle types, nothing special, just a list of unique vehicle types such as truck, lorry, bike, motor bike, plane, tractor etc etc For the table design I am...
7
by: Wolfgang Kreuzer | last post by:
Hello all, I have two tables - Projects and ProjectStruct Table Projects contains master records of the projects, ProjectStruct allows to define a project herarchie and contains the fields...
4
by: maricel | last post by:
I have the following base table structure - DDL: CREATE TABLE "ADMINISTRATOR"."T1" ( "C1" INTEGER NOT NULL ) IN "TEST_TS" ; ALTER TABLE "ADMINISTRATOR"."T1" ADD PRIMARY KEY
4
by: Nathan Benefield | last post by:
I currently have a spreadsheet tracking votes on legislation in a matrix type format. It is something like this Name Act1 Veto1 Act1A Jones yes No Yes Johnson Yes ...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
6
by: polocar | last post by:
Hi, I'm writing a program in Visual C# 2005 Professional Edition. This program connects to a SQL Server 2005 database called "Generations" (in which there is only one table, called...
7
by: samoore33 | last post by:
I want to list all of the items in a dataset in a textbox. The dataset has multiple tables. When I try to use the code below, even though I dim myState as the DataTable("state"). It still looks for...
1
by: yawnmoth | last post by:
I have two tables on the following page: http://www.frostjedi.com/terra/scripts/demo/tables.html I'm trying to make the top one look like the bottom in using only CSS. In FireFox, what I...
0
by: remya1000 | last post by:
I have a field called Departments in my database. and I have 3 monitors. So when Page_Load, I need to check number of departments I have in database. And depends upon that number of departments I...
12
by: Michael.Z | last post by:
Anyone who can help: Given a Table.h file I am writing a Table.c file. I keep getting the compile error: previous declaration of Table was here / conflicting types for I think the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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...

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.