Questions tagged [datarelation]

60 questions
1
vote
1 answer

Constraint error in adding Multi rows to master/detail dataset

I have 2 dataGridViews bound to a master/detail relationship. When I try to add a second row to the master dataGridView I get the following error. system.data.constraintexception column "Project Customer UBF Id" is constrained to be unique. Value ''…
user21202
  • 11
  • 4
1
vote
1 answer

DataRelation between two data tables - can't bind data to a listbox (C# .NET 3.5)

C# (.NET 3.5) I have an SQLite database with two tables - employees (the first column being id INTEGER PRIMARY KEY), and holidays (id INTEGER - meaning the ID of the employee; start DATE, end DATE - self-explanatory). My form contains textboxes,…
Konrad Morawski
  • 8,307
  • 7
  • 53
  • 91
1
vote
1 answer

Populating column with data from DataRelation child datatable

If this has been answered before, please point me to it; I was not able to find anything alike. My situation: 1 datagridview bound by BindingSource to table1 from DataSet (EF) table1 has datarelation to table2 (one-to-one) Now, I need to display…
BertvanDorp
  • 93
  • 1
  • 9
1
vote
2 answers

Is it possible to create DataRelation 1:1 in c#?

In my app I use ORM Designer which supports only 1:1 relation. I have Items, Products, Shipping tables: Item has ProductId and ShippingId attributes which are foreign keys. I need to upload data from xml file into my SQL DB, so I gonna use…
Aleksei Chepovoi
  • 3,915
  • 8
  • 39
  • 77
1
vote
1 answer

Issue with Combining two datatables using DataRelation

Hi I am attempting to combine the following two datatables, the code is not erroring however it is not combining them in the output. I am having trouble with this line: if (pdc.ColumnName != "ORDER_NUMBER") dac[pdc.ColumnName] =…
0
votes
1 answer

Visual Basic 2008: Can command builder be used to update tables connected by data relations?

I have three tables, with two data relations connecting them (Table 1 -> Table 2 <- Table 3). I've been trying to use the command builder to generate the update, delete and insert commands as in this article but I cant seem to get this approach to…
0
votes
1 answer

Datarelation with ultragrid

I have a datatable like this : Quantity Price Date Comment 50 20 10/15 Buy 160 40 15 10/15 Buy 160 60 14 10/15 Buy 160 35 22 10/16 Buy 276 44 16 10/16 Buy…
francops henri
  • 507
  • 3
  • 17
  • 29
0
votes
2 answers

Is it possible to order data in a datatable by a related datatable in the dataset?

I've been using ORM's for so long, I appear to have forgotten most of my basic data handling skills in dotnet :( Is it possibly to do something like this? DataSet ds = new DataSet(); var compiledConnection = new…
Bob Tway
  • 9,301
  • 17
  • 80
  • 162
0
votes
1 answer

How would one get a DataGridViewCheckBoxColumn to show DataRelation status?

Say I have a DataGridView (named dataGridView) that is displaying a Strongly Typed DataTable (named ChildDataTable). dataGridView has a DataGridViewCheckBoxColumn (named parentIDColumn) that is bound to a Field Property ParentID on each ChildDataRow…
el2iot2
  • 6,428
  • 7
  • 38
  • 51
0
votes
1 answer

DataRelation from a single query

i have the following piece of VB.NET code: Dim conn As New MySql.Data.MySqlClient.MySqlConnection(ConnectionString) conn.Open() Dim sql = "SELECT * FROM users" Dim com = New MySql.Data.MySqlClient.MySqlCommand(sql, conn) Dim ds…
pistacchio
  • 56,889
  • 107
  • 278
  • 420
0
votes
1 answer

how to add a relationship between tables in the dataset

I have the following code to get the get the relationship between the tables in the same dataset , but when run the following code i encounter with error saying , these columns currently dont have unique values DataResultSetDataSet dataset =…
mahesh
  • 3,067
  • 16
  • 69
  • 127
0
votes
0 answers

How to display two tables in one datagridview with vb.net

I will cut down my real tables to these examples: I have two tables and they have a relation let me say ("ID" "Name_ID") and ("ID" "Name") I would like to display table 1 with the Name instead of Name_ID. In my case I would like to do it without a…
Florian
  • 31
  • 1
0
votes
0 answers

DataSet with DataRelation combining child records from multiple parents into one

Ive run into what seems to be kind of an odd issue with some legacy code. The code in question is creating a DataSet with 2 DataTables, and then defining the relationships between the tables before the data is used in a grid view (custom user…
Justin Greywolf
  • 650
  • 7
  • 17
0
votes
0 answers

Join tables in vb.NET

There's a lot of posts (on this and other sites) about this matter, but every solution I read involves SQL queries and I'm not looking for such a solution. I have three DataTables (vb.NET) and I want to join them by the first column (which contains…
Pspl
  • 1,398
  • 12
  • 23
0
votes
1 answer

DataRelation: How to compare specific columns

I am comparing two datatables using the answer in this link Compare two Datatables but when I use the DataRelation function I am getting an error that both columns length should match. but I want to only compare specific columns. Currently I have…
edcoder
  • 503
  • 1
  • 5
  • 19