求助~~数据库插入的时候提示错误。。
错误 :
raised exception class eoleexception with message ‘应用程序在当前操作中使用了错误类型的值。’
try ConTemp.BeginTrans; with DataModule6.qry_DynamicQuery do begin Close; SQL.Text := SQLStr; ExecSQL; Close; SQL.Text := 'INSERT INTO GZ_UpdateLog Values(:p_Text, :p_SQLText, :p_Date, :p_UserID)'; TextTemp := Copy(MessageStr, 7, Length(MessageStr) - 8); Parameters.ParamByName('p_Text').Value := TextTemp; //string类型,运行到这里出错 Parameters.ParamByName('p_SQLText').Value := SQLStr; Parameters.ParamByName('p_Date').Value := Dosp_GetSysTime; Parameters.ParamByName('p_UserID').Value := UserID; ExecSQL; end; ConTemp.CommitTrans; except on E: Exception do begin ShowMessage(E.Message); ShowMessage('更新错误,事务回滚!'); ConTemp.RollbackTrans; WriteWorkLog(E.Message, Dosp_GetSysTime); Exit; end; end;