Board index » delphi » ADO Right Join Updates

ADO Right Join Updates

Hello !!

I have two tables WeekDays ( id, Name) and ClassHours( Asignature, Sesion,
Day,  StartHour, EndHour)

WeekDays
1    Monday
2    Tuesday
3    Wednesday
4    Thurday
5    Friday
6    Saturday

ClassHours
MAT-011    1   2 (Tuesday)        10:00 12:00
MAT-011    1   3 (Wednesday)   10:00  12:00

Using the next sql the data is shown correctly in a grid,

select  a.*, b.*
from WeekDays as a
Left Join
(select * from ClassHours as c where c.Asignature = "SIS-202" ) as b on
a.dia=b.dia

However, when try to append exception arrises. I believe that using
BetterADODataSet works, but I do not know how to use it. There is another
way to do that using Delphi standard objects such as ClientDataSet, etc? or
do you know some tutorial or demo of BetterADODataSet ?

 

Re:ADO Right Join Updates


Hello !!

I have two tables WeekDays ( id, Name) and ClassHours( Asignature, Sesion,
Day,  StartHour, EndHour)

WeekDays
1    Monday
2    Tuesday
3    Wednesday
4    Thurday
5    Friday
6    Saturday

ClassHours
MAT-011    1   2 (Tuesday)        10:00 12:00
MAT-011    1   3 (Wednesday)   10:00  12:00

Using the next sql the data is shown correctly in a grid,

select  a.*, b.*
from WeekDays as a
Left Join
(select * from ClassHours as c where c.Asignature = "SIS-202" ) as b on
a.dia=b.dia

However, when try to append exception arrises. I believe that using
BetterADODataSet works, but I do not know how to use it. There is another
way to do that using Delphi standard objects such as ClientDataSet, etc? or
do you know some tutorial or demo of BetterADODataSet ?

Re:ADO Right Join Updates


Your JOIN consists of two tables; Ado does not know which
of the two you want to modify.

You must set the property "Unique Table" to inform ADO which
table you want to modify:

MyAdoDataset.properties['Unique Table'].Value:=tablename;

---------------------------------
Arthur Hoornweg

Please remove the ".net" from my E-mail address.
I had to take this unpleasant measure to fend off unsollicited mail.

Re:ADO Right Join Updates


Quote
> You must set the property "Unique Table" to inform ADO which
> table you want to modify:

This only works for delete operations.

--
Vassil Nazarov
http://web.orbitel.bg/vassil/

Re:ADO Right Join Updates


Quote
> However, when try to append exception arrises. I believe that using
> BetterADODataSet works, but I do not know how to use it.

Set the Unique_Table property as needed, leave all other properties
at their default values and you are done. <g>

Quote
> ... do you know some tutorial or demo of BetterADODataSet ?

Reading the help file should be sufficient.

HTH
--
Vassil Nazarov
http://web.orbitel.bg/vassil/

Re:ADO Right Join Updates


Quote
> This only works for delete operations.

Also for most normal editing procedures (updates)
using data-aware components but within certain
limitations, AFAIK. It won't work for inserts though.

---------------------------------
Arthur Hoornweg

Please remove the ".net" from my E-mail address.
I had to take this unpleasant measure to fend off unsollicited mail.

Other Threads