Dataset design doesn't match with database

G

Guest

HI,

I am Roby Eisenbraun Martins. I am a VC++, VB and NET developer.

I created a Dataset using the dataset designer and I added two tables on
it. This tables came from a SQL Server database and they have a relation ship
in the SQL Server. So a created the same relatio ship in the dataset designer.

Executing the Fill method from a data adapter I received this error
message "Failed to enabled constraints, .....". If I remove the relationship
it works.

How can that be possible if the database contain the same relation ship?

Thank you,
Roby Eisenbraun Martins
 
G

Guest

Hey,

I found out the problem. One record had got a null value in the field
related to the other table and Dataset thought that it should be treated an
error.
How can I change the relationship to accept null fields.

Client - Product
ID - ClientID
( this should accept NULL, if is null then there are no
client to this
product )

Thank you,
Roby Eisenbraun Martins
 
B

Bud Dean

Hey Roby,

I believe you should be able to turn off constraints before you fill the
dataset...
 

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