Re: Join problem i Access
- From: "Mikael Lenfors" <mikael@xxxxxxxxxx>
- Date: Mon, 14 Aug 2006 19:53:53 +0200
Thanks, must have done an error while cutting and pasting....
regards, Mikael
"Brian Bushay TeamB" <BBushay@xxxxxxxxx> skrev i meddelandet
news:llivd2lmn4qr6mi28k0rsj10c6lfi3bs2s@xxxxxxxxxx
Hello!I don't see where you have defined the Alias AL that you use in the Select
Im running the following query on an Access database:
ADOQuery.Close;
ADOQuery.SQL.Clear;
ADOQuery.SQL.Add('Select AE.UnitID, AE.ChannelID,
AE.AlarmCreationDateTime,
AT.AlarmTypeName, AL.AlarmDescription, AE.AlarmText');
ADOQuery.SQL.Add('From ((AlarmEvents AE');
ADOQuery.SQL.Add('Left Outer Join AlarmTypes On AlarmTypes.AlarmType =
AE.AlarmType)');
ADOQuery.SQL.Add('Left Outer Join Alarms On Alarms.AlarmID =
AE.AlarmID)');
ADOQuery.SQL.Add('Order By AlarmEventDateTime Desc');
ADOQuery.Open
And it gives me an exception with "undefined error".
When I run the same query from within Access it executes without
problem...
Any ideas?
clause. If you are going to alias tables it is best to alias all the
tables.
--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.
- References:
- Join problem i Access
- From: Mikael Lenfors
- Re: Join problem i Access
- From: Brian Bushay TeamB
- Join problem i Access
- Prev by Date: Re: Go to specific record
- Next by Date: Re: Like TClientDataSet.Delta,ADO can only save modified data into stream or file?
- Previous by thread: Re: Join problem i Access
- Next by thread: ADO connection query to table containing a space
- Index(es):
Relevant Pages
|