 |
|
mind.beggar |
28-02-2013 10:50 2100919 |
Invalid variant type conversion
Код:
DM1.Qtemp.Close;
DM1.Qtemp.SQL.Clear;
DM1.Qtemp.SQL.Add('insert into sb_dok_el(INSTRKOD, DOCNUM, DOKDATE, KLADOVSCHIK, DOK_ID, SKLKOD, OPTYPE_ID, ID_ROOTDOC)');
DM1.Qtemp.SQL.Add('values (:aINSTRKOD, :aDOCNUM, :aDOKDATE, :aKLADOVSCHIK, :aDOK_ID, :aSKLKOD, :aOPTYPE_ID, :aID_ROOTDOC)');
with DM1.Qtemp.ParamByName('aINSTRKOD') do
begin
ParamType := ptInput;
DataType := ftInteger;
Value := DM1.qSklad.FieldByName('INSTRKOD').Text
end;
with DM1.Qtemp.ParamByName('aDOCNUM') do
begin
ParamType := ptInput;
DataType := ftString;
Value := eNum.Text;
end;
with DM1.Qtemp.ParamByName('aDOKDATE') do
begin
ParamType := ptInput;
DataType := ftDate;
Value := eDOKDATE.Value;
end;
with DM1.Qtemp.ParamByName('aKLADOVSCHIK') do
begin
ParamType := ptInput;
DataType := ftString;
Value := eKLADOVSCHIK.Text;
end;
with DM1.Qtemp.ParamByName('aDOK_ID') do
begin
ParamType := ptInput;
DataType := ftInteger;
Value := sb_dok_id;
end;
with DM1.Qtemp.ParamByName('aSKLKOD') do
begin
ParamType := ptInput;
DataType := ftInteger;
Value := skl_kod;
end;
with DM1.Qtemp.ParamByName('aOPTYPE_ID') do
begin
ParamType := ptInput;
DataType := ftInteger;
Value := 92;
end;
with DM1.Qtemp.ParamByName('aID_ROOTDOC') do
begin
ParamType := ptInput;
DataType := ftInteger;
Value := rootdoc_id;
end;
DM1.Qtemp.ExecSQL;
На ExecSQL влится ошибка "Invalid variant type conversion"
Как ее вылечить?
|
Цитата:
Цитата mind.beggar
ParamType := ptInput;
DataType := ftInteger;
Value := DM1.qSklad.FieldByName('INSTRKOD'). Text »
|
DM1.Qtemp.ExecSQL; лишь выполняет запрос.
Ошибка идет потому, что какой-то параметр задан не верно.
Ответ выделен выше.
|
Время: 23:13.
© OSzone.net 2001-