Re: Parameters in MS Access



I'm getting an error message 'Jet database does not recognize [yID] as an
invalid field name or expression' for the following code. The parameter
value [yID] is invalid for some reason. I'm using MSAccess2000 with D6. What
is the problem?

ADODataSet.Parameters.ParamByName('[yID]').Value:= X_.FieldValues['ID'];
ADODataset.Active:= false;
ADODataset.CommandText:= 'TRANSFORM First(X.TIME) AS FirstOfTIME '+
'SELECT X.ID, X.NO, '+
'WHERE (X.ID) = [yID]'+
'GROUP BY X.ID, X.NO '+
'PIVOT X.NO ';
ADODataset.Open;


Parameters in a delphi query are preceded by a colon
WHERE (X.ID) = :yID

--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.



Relevant Pages

  • Parameters in MS Access
    ... I'm getting an error message 'Jet database does not recognize as an ... invalid field name or expression' for the following code. ... value [yID] is invalid for some reason. ...
    (borland.public.delphi.database.ado)
  • Re: Alternative History
    ... Free of the Yid ... virus that infects the Western World. ... All the more reason to ...
    (soc.culture.israel)