473,403 Members | 2,183 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,403 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 1268
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...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
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...
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.