Ver la Versión Completa : Problema al relacionar dos tablas
asegurpe
27-04-2004, 17:30:30
Hola,
Necesito relacionar dos tablas mediante las propiedades MasterSource y MasterField, el problema esta que en cuanto activo la tabla aparece el siguiente error:
Could not convert variant of type (Null) into type (String)
Los dos campos son numericos.
Estoy utilizando el componente THalcyonDataSet en Delphi 7.
De antemano, gracias.
asegurpe
28-04-2004, 16:27:45
Muy buenas,
Ya he podido resolver el problema.
Para resolverlo lo he hecho de una manera muy bruta, que es modificar directamente el codigo del Halcyon.
Del fichero gs6_DBF he modificado lo marcado como negrita.
Procedure GSO_dBaseFld.gsStuffABuffer(Buffer: PChar; const KeyFields: string; const KeyValues: Variant);
var
Psn: integer;
Ctr: integer;
cf: string;
cv: string;
tsl: TStringList;
begin
CurRecord := pointer(Buffer);
gsBlank;
if length(KeyFields) > 0 then
begin
tsl := TStringList.Create;
Psn := 1;
while Psn < length(KeyFields) do
begin
cf := gsExtractFieldName(KeyFields,Psn);
tsl.Add(cf);
end;
if tsl.Count = 1 then
begin
if ((VarIsStr(KeyValues)) and (KeyValues <> '')) or (IntToStr(KeyValues) <> '') then
cv := KeyValues
else
cv := '';
gsStringPut(tsl[0],cv);
end
else
begin
for Ctr := 0 to tsl.Count-1 do
begin
if KeyValues[Ctr] <> '' then
cv := KeyValues
else
cv := '';
gsStringPut(tsl[Ctr],cv);
end;
end;
tsl.Free;
end;
CurRecord := CurRecHold;
end;
Salutaciones,
Asegurpe
vBulletin v3.6.8, Derechos ©2000-2024, Jelsoft Enterprises Ltd.