"Could not convert variant of type (Null) into type (String)"

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
haci
Posts: 11
Joined: Tue 17 Jan 2006 11:32

"Could not convert variant of type (Null) into type (String)"

Post by haci » Sat 28 Jan 2006 08:31

Hi, I use TMSQuery object, and when i use this object with Delphi's Lookup function. When i call this line i take this error message "Could not convert variant of type (Null) into type (String)".

VRNT := tblrights.Lookup('PRJ;UUSER', VarArrayOf([IntToStr(PRJ), IntToStr(user.ID)]) , 'ID;STU');
if not (VarType(VRNT) in [varNull]) then begin
showmessage (VRNT[0] + ' - ' + VRNT[1]);
v := 1;
end;


I didn't find any solution.

Thank you.

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Mon 30 Jan 2006 11:37

Please specify types of all used fields.

Post Reply