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

Duwamish Framework--Filling DataSet

I'm trying to use the Duwamish 7.0 Framework to make a
distributed application.

I re-wrote parts of the application to work with Students
instead of Customers. So instead of a unique email
constraint I have a unique constraint on FirstName,
LastName, DateOfBirth combination.

Whenever I try to fill a brand new StudentData (instead of
CustomerData) object, I get the following error...
Failed to enable constraints. One or more rows contain
values violating non-null, unique, or foreign-key
constraints.

I debugged right down to the line of code where it
happens...
StudentData data = new StudentData();
//
// Get the load command
//
dsCommand.SelectCommand =
GetLoadCommandByNameAndDateOfBirth();
dsCommand.SelectCommand.Parameters[FIRST_NAME_PARM].Value
= FirstName;
dsCommand.SelectCommand.Parameters[LAST_NAME_PARM].Value =
LastName;
dsCommand.SelectCommand.Parameters
[DATE_OF_BIRTH_PARM].Value = DateOfBirth;

DataSet data2 = new DataSet();
dsCommand.Fill(data2); //this works all the time
dsCommand.Fill(data); //this doesn't work when the data
I'm searching exists in the database

Any ideas?

Thanks!
-Paul
Nov 17 '05 #1
2 1081
Side Note: FirstName LastName and DateOfBirth IS NOT Unique.
that has nothing to do with your problem?
Might need to check things in your Database

"Paul" <Pa**@PaulWantsHelp.com> wrote in message
news:00****************************@phx.gbl...
I'm trying to use the Duwamish 7.0 Framework to make a
distributed application.

I re-wrote parts of the application to work with Students
instead of Customers. So instead of a unique email
constraint I have a unique constraint on FirstName,
LastName, DateOfBirth combination.

Whenever I try to fill a brand new StudentData (instead of
CustomerData) object, I get the following error...
Failed to enable constraints. One or more rows contain
values violating non-null, unique, or foreign-key
constraints.

I debugged right down to the line of code where it
happens...
StudentData data = new StudentData();
//
// Get the load command
//
dsCommand.SelectCommand =
GetLoadCommandByNameAndDateOfBirth();
dsCommand.SelectCommand.Parameters[FIRST_NAME_PARM].Value
= FirstName;
dsCommand.SelectCommand.Parameters[LAST_NAME_PARM].Value =
LastName;
dsCommand.SelectCommand.Parameters
[DATE_OF_BIRTH_PARM].Value = DateOfBirth;

DataSet data2 = new DataSet();
dsCommand.Fill(data2); //this works all the time
dsCommand.Fill(data); //this doesn't work when the data
I'm searching exists in the database

Any ideas?

Thanks!
-Paul

Nov 17 '05 #2
Create a datarealation amongst the columns.

"MS News (MS ILM)" <sq**********@hotmail.com> wrote in message
news:u7**************@TK2MSFTNGP12.phx.gbl...
Side Note: FirstName LastName and DateOfBirth IS NOT Unique.
that has nothing to do with your problem?
Might need to check things in your Database

"Paul" <Pa**@PaulWantsHelp.com> wrote in message
news:00****************************@phx.gbl...
I'm trying to use the Duwamish 7.0 Framework to make a
distributed application.

I re-wrote parts of the application to work with Students
instead of Customers. So instead of a unique email
constraint I have a unique constraint on FirstName,
LastName, DateOfBirth combination.

Whenever I try to fill a brand new StudentData (instead of
CustomerData) object, I get the following error...
Failed to enable constraints. One or more rows contain
values violating non-null, unique, or foreign-key
constraints.

I debugged right down to the line of code where it
happens...
StudentData data = new StudentData();
//
// Get the load command
//
dsCommand.SelectCommand =
GetLoadCommandByNameAndDateOfBirth();
dsCommand.SelectCommand.Parameters[FIRST_NAME_PARM].Value
= FirstName;
dsCommand.SelectCommand.Parameters[LAST_NAME_PARM].Value =
LastName;
dsCommand.SelectCommand.Parameters
[DATE_OF_BIRTH_PARM].Value = DateOfBirth;

DataSet data2 = new DataSet();
dsCommand.Fill(data2); //this works all the time
dsCommand.Fill(data); //this doesn't work when the data
I'm searching exists in the database

Any ideas?

Thanks!
-Paul


Nov 17 '05 #3

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

Similar topics

0
by: Frank Wisniewski | last post by:
Hi All, I have a question about the Duwamish 7.0 example. I am watching the "Architecting an Application Using Microsoft .Net framework, Part 1" and there is a demo which show the Visio file...
1
by: Angie Robinson | last post by:
When I try to install the Duwamish samples, either the VB or C# ones, I get a message saying that I must install the .net framework sdk version 1.0.3705 and then it quits. I have version 1.1.4322...
3
by: Bill C. | last post by:
Hi, I've got a simple console app that just reads an XML file into a DataSet then prints out a description of each table in the DataSet, including column names and row values for each column. ...
0
by: Srinivasan | last post by:
Can you help me solve the following error : Other useful info are : 1. OS : Windows 2000 Professional 2. Sql Server : 2000 3. I am able to see the Duwamish database from Enterprise Manager. 4....
1
by: Srinivasan | last post by:
When I try to run the following URL : http://localhost/Duwamish7/default.aspx of Duwamish Online application, an error page appears with the following message : ...
0
by: Srinivasan | last post by:
My earlier query regarding Duwamish Online 7 - C#, dated 31.08.2003 was not replied to. Does Microsoft still support Duwamish Online ? Or is it obsolete or something and so no response is given? ...
5
by: Cybertof | last post by:
Hello, Is it necessary to initially fill a dataset to be able to add a new row to the dataset and then update the undercover database ? (In the case of a very large database, this would mean...
2
by: Paul | last post by:
I'm trying to use the Duwamish 7.0 Framework to make a distributed application. I re-wrote parts of the application to work with Students instead of Customers. So instead of a unique email...
0
by: nick | last post by:
Hello, Is Duwamish a good reference implementation? Why it defines a few identical method (Customer, Shopping card, etc) in both the class PageBase and ModuleBase in the web project? Sounds the...
14
by: Bihn | last post by:
I was reading about datareader which is said to be slimmer & faster then dataset. Since the datareader have to go fetching the dat from the database every time it need it, the data it gets then...
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
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
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...
0
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...
0
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...

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.