Unique constraint violation when Filling a Dataset

  • Thread starter Thread starter Hugh Barnett
  • Start date Start date
H

Hugh Barnett

I am using Visual Studio to create a VB .NET application to run on
Windows 2000. I am trying to display data from a Sybase ASA table in a
form, allow the user to update the data in the form, and then update the
Sybase table.

I created a OleDbDataAdapter using the wizard. The SQL I used was to
select all the data (2 columns) from one table. I then generated a
dataset with the one table. Then I click on "preview data" and then
"Fill Dataset", and I get the error "Failed to enable constraints. One
or more rows contain values violating non-null, unique, or foreign-key
constraints". It gives me the data in a grid, but the columns
DBCOLUMN_IDNAME and DBCOLUMN_GUID have nulls. The actual table's
columns has data.

I have the same problem no matter what table I put in the Data Adapter,
however when the Sybase table has more columns, there are more of the
DBCOLUMN... columns.

I'm at a loss as to where to being in determining the problem. Thanks
for any help.

Hugh Barnett
National Spinning Company
 
Hugh,

I don't see the answer on your question related to normal use what should
give no problem the way you do it, maybe it has something to do with a
special kind of use in Sybase.

Therefore I think it is good to ask this question also in the newsgroup
microsoft.public.dotnet.framework.adonet

I hope you find your solution

Cor

"Hugh Barnett"
...
 

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

Back
Top