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

Error creating relation in DataSet


What on earth causes an ArgumentNullException? I've checked the spelling of my
table and column names, those are fine. The relation I created one line above this one
creates fine.

I can't continue developing this app until I work out why this is happening - and I can't
work it out :S
-- CODE--
Catalogue.Relations.Add(ADM.COLLECTION_FURNITURE_R ELATION,

Catalogue.Tables[ADM.COLLECTION_TABLE].Columns[ADM.COLLECTIONID_FIEL
D],

Catalogue.Tables[ADM.FURNITURE_TABLE].Columns[ADM.COLLECTIONID_FIELD]
,
true);
-- END CODE --

-- EXCEPTION --
[ArgumentNullException: 'column' argument cannot be null.
Parameter name: column]
System.Data.DataKey.Create(DataColumn[] columns, Int32[] sortOrders)
System.Data.DataKey..ctor(DataColumn[] columns)
System.Data.DataRelation.Create(String relationName, DataColumn[] parentColumns,
DataColumn[] childColumns, Boolean createConstraints)
System.Data.DataRelation..ctor(String relationName, DataColumn parentColumn,
DataColumn childColumn, Boolean createConstraints)
System.Data.DataRelationCollection.Add(String name, DataColumn parentColumn,
DataColumn childColumn, Boolean createConstraints)
Adquiesco2.Global.CreateCatalogueDataset(Adquiesco DatabaseManager dCon) in
d:\web design\active sites\adquiesco2\global.asax.cs:120
Adquiesco2.Global.Application_Start(Object sender, EventArgs e) in d:\web
design\active sites\adquiesco2\global.asax.cs:34
-- END EXCEPTION --
------------------------------------

Another unchecked rambeling brought to you by:

Oddball
joshua@bf#N0SP4M#wd.co.uk
Nov 17 '05 #1
1 2043
Hello,
Please answer these questions. What is ADM. Are the accessors after
the '.' properties or static variables?
Are you sure that the columns you are getting for the relation are not
null?
Maqsood Ahmed [MCP C#,SQL Server]
Kolachi Advanced Technologies
http://www.kolachi.net

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #2

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

Similar topics

6
by: Jade | last post by:
Hi, I am trying to create a dataset with 6 tables and 5 relationships created between them. I am creating it in the Form_Load event. However i keep getting the following error... An unhandled...
0
by: Shaun Ram | last post by:
Hello, I am trying to build a relation between 2 datatables & bind the resultant to the datagrid. For Example from DataTable 1 architecture Column1 Column2 Column3 X A 1...
6
by: Brian Henry | last post by:
Here's an example of the code.. I have two combo boxes on screen that when one's selection is change the other's items will be updated to reflect the change (based on a relation) Private...
6
by: Peter W Johnson | last post by:
Hi Guys, I am trying to display a datagrid containing two related datasets. I have filled and related them on MemberID with the following code:- Dim myconnection As Odbc.OdbcConnection
5
by: Corno | last post by:
Hi all, If I want to provide a typed dataset from a webservice and if that dataset has relations that are nested (isNested=True), then the relations(keyrefs) are not available in the XSD that is...
4
by: Scott at Cedar Creek | last post by:
I've got a situation where I have live data coming in from multiple sources. I'm able to get it into two tables in RAM. I have one table called "Providers" and it has a ProviderID and some other...
5
by: Mike Collins | last post by:
I am trying to export data from multiple tables in SQL Server to an XML file so I can then import it to another database. It seems to be working fine for exporting, but I am having trouble...
1
by: Hexman | last post by:
Hello All, What I'm trying to do is update a child record using a parent-child relation. I want to find out if it is faster than than doing multiple selects. Anyways, I've created a dataset...
1
by: Tim Kelley | last post by:
I have two tables that are linked by 2 fields (ID1 and ID2). Is it possible to create this relation once the tables are in a DataSet? I can create a relation using a single field, but I don't...
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:
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...
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
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...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.