PC Review


Reply
Thread Tools Rate Thread

Dataset design doesn't match with database

 
 
=?Utf-8?B?Um9ieSBFaXNlbmJyYXVuIE1hcnRpbnM=?=
Guest
Posts: n/a
 
      25th Oct 2005
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Um9ieSBFaXNlbmJyYXVuIE1hcnRpbnM=?=
Guest
Posts: n/a
 
      25th Oct 2005
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

"Roby Eisenbraun Martins" wrote:

> 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

 
Reply With Quote
 
Bud Dean
Guest
Posts: n/a
 
      26th Oct 2005
Hey Roby,

I believe you should be able to turn off constraints before you fill the
dataset...
"Roby Eisenbraun Martins" <(E-Mail Removed)>
wrote in message news:6B8146B9-076A-4E1F-9005-(E-Mail Removed)...
> 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
>
> "Roby Eisenbraun Martins" wrote:
>
>> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why doesn't my access database contact id match up? =?Utf-8?B?U2NvdHQgSC4=?= Microsoft Access 5 1st Dec 2005 02:09 PM
Database doesn't update from datagrid using dataset Assimalyst Microsoft ADO .NET 1 30th Sep 2005 03:09 PM
Preview doesn't match Design Joan Microsoft Frontpage 6 27th Feb 2005 06:33 AM
Page width in browser doesn't match design in FrontPage =?Utf-8?B?U3RldmVC?= Microsoft Frontpage 6 8th Nov 2004 05:03 PM
why doesn't dataset generator use default values defined in the database? boo Microsoft ADO .NET 1 13th Nov 2003 07:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:58 AM.