Wrox Programmer Forums
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 4th, 2003, 11:01 AM
Registered User
 
Join Date: Nov 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Failed to enable constraints

Hello,

I am making an interface from VB.NET to Micro's Access. I am using an SQL statement to pull a name from a table depending on the number entered in the interface:

     select first_name from val_stu where patron_id = " & (Val(txtNumber.Text))


I get the error on the line with the code:

     OleDataAdapter3.Fill(DataSet31, "val_stu")


The error is:

     "An unhandled exception of type 'System.Data.Constraint Exception' occuered in tsystem.data.dll

      Additional information: Failed to enable constraints. One or more rows contain values violating non-null, unique or foreign-key constraints"


Does anyone know what this means and how I can solve the problem.


thanks,

lab assistant


 
Old November 4th, 2003, 11:19 AM
Registered User
 
Join Date: Nov 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry to post all.

I figured out the problem. It was my SQL stament.

The statement should have been "select * from val_stu " not "select first_name from".

Hope my dumb mistake helps someone else out int the future.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Enable Update and Enable Delete check boxes don't mihabib ASP.NET 2.0 Basics 2 December 7th, 2006 11:44 AM
Dropping constraints epp_b MySQL 2 September 12th, 2006 09:22 PM
How do you suspend constraints? Aaron Edwards SQL Server 2005 2 July 31st, 2006 12:16 PM
Can somebody please Failed to enable contraints? Ron Howerton VS.NET 2002/2003 6 September 22nd, 2003 11:57 AM
Failed to enable constraints. One or more rows con Ron Howerton ASP.NET 1.0 and 1.1 Basics 0 August 19th, 2003 03:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.