Re:Not sure what I'm doing :)
Use qry.FieldByName('yourfieldname').AsString
or AsInteger, or AsFloat, etc...
You can also check if the field is null:
if qry.FieldByName('yourfieldname').IsNull then
...
bye
Quote
Brent wrote:
> I'm trying to set some variables using:
> MyVariable := qry.FieldValues['myfieldvalue'];
> However, if 'myfieldvalue' is NULL I get an exception...is there a way
> around this other than in the SQL statement itself. My goal is that even if
> the value is NULL I can replace it with my own text (i.e. Not Available). I
> tried an if statement but that too raised an exception. All I know to do at
> this point is maybe a try but I don't think that would work either.
> Help!! Thanks in advance!
> -Brent
--
Guillermo Casta?o Acevedo
Gerente de Sistemas - Grupo Millennium Ltda
Guiller...@GrupoMillennium.com
www.GrupoMillennium.com