Error "Failed to enable constraints."

C

cerr

Hi There,

I want to make a simple select from a table (route_wp) that looks like
this:

routeID - int - No null, no unique and primary
wpID - int - No null, no unique and primary

and i filled it with following sample data:
1,1
2,2
Then i created a query in the table adapter that goes like "select
wpID from route_wp where routeID=@routeID"
Now when i call that adapter method in my application with a hardcoded
1 as the argument, i get following message showing up:
"Failed to enable constraints. One or more rows contain values
violating non-null, unique, or foreign-key constraints"
Why is that? I don't understand!

Thanks,
Ron
 
P

Peter Duniho

cerr said:
[...]
Now when i call that adapter method in my application with a hardcoded
1 as the argument, i get following message showing up:
"Failed to enable constraints. One or more rows contain values
violating non-null, unique, or foreign-key constraints"
Why is that? I don't understand!

The error message seems pretty self-explanatory to me. But if you
require detailed assistance, you should post your question in a forum
where questions about how to use a database are on-topic. There's
nothing in your question that suggests any specific relevance to .NET or C#.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top