 
			
				28.02.2013, 12:53
			
			
			
		  
	 | 
	
		
		
		
			
			| 
			
				
				
				 Прохожий 
				
				
			 | 
			  | 
			
				
				
					Регистрация: 25.01.2013 
					
					
					Сообщения: 6
 
				Версия Delphi: Delphi 7 
					Репутация: 10 
					    
				 
				
			 | 
		 
		 
		
	 | 
	
	
	
		
			
			
				 
				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". 
Как ее вылечить?  
		
	
		
		
		
		
		
	
		
			
 
			
			
			
				 
			
			
			
			
		 
		
	
	
	 |