本帖隐藏的内容
function UpdateFactorData(instance,username,password,table,column,FactorData,Date)%this function is used to update factor data DB
%programed by Lian Xiangbin(连长,785674410@qq.com),DUFE,20141009
%connect to the db
conna=database(instance,username,password);
%convert the mat to cell
FactorDataCell=num2cell(FactorData);
%construct where cell
temp=['where date='];
temp1=repmat(temp,size(Date));
Where=strcat(temp1,'''',Date,'''');
%do the updating work
update(conna,table,{column},FactorDataCell,Where);
%close the connection
close(conna);
end