I belevie that having it setup in a dataset provides an error trap on the
client side before the push to the datafile.
After, once you push to the datafile (sql file) then this will push the
error back to the client back.
So you save yourself the round trip.
Here is an example:
Lets say you have a parent child table. The relationship is setup and a
child requires a parent record.
However, if you make a dataset with just the child table record, try to
delete a record - it will let you.
That is - until you try to push the data back to the datafile. Then you
will get an error.
Miro
"Paul Ilacqua" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I Tested it with and without relations in my VB code. Without it "allows"
> foreign key violations, and with it it raises an error. Is it an argument,
> of the dataset, table ?
> Thanks for the response.
>
> "PvdG42" <(E-Mail Removed)> wrote in message
> news:eNN%(E-Mail Removed)...
>>
>> "Paul Ilacqua" <(E-Mail Removed)> wrote in message
>> news:CF4070C2-61A8-46A0-B202-(E-Mail Removed)...
>>> I'm using VB 2005....
>>> I programmatically create a Dataset(), fill it (Via a data adapter)
>>> with 3 tables from a SQL Server 2008 database that already has the
>>> relationships' and Foreign keys defined. Do I need to recreate them in
>>> the dataset?
>>> I'd like to maintain my relationships in the SQL Server, so I do
>>> not have a point of failure maintaining relations in my dataset.
>>> Thanks
>>> Paul
>>
>> In a word, yes.
>
|