+ -
当前位置:首页 → 问答吧 → Could not convert variant of type(String) into type(Date)求帮忙!!!

Could not convert variant of type(String) into type(Date)求帮忙!!!

时间:2011-10-17

来源:互联网

if(cxGrid1DBTableView1.Columns[i].Caption='时间') then OraQuery2.ParamByName('aaa').AsString := DateToStr(cxGrid1DBTableView1.Columns[i].DataBinding.Field.OldValue)
这是在保存代码里写的,用了2个cxgrid,cx1和cx2,OraQuery2是cx2里的,时间在数据库表1里是DATE型,aaa在表2里是varchar2()型, 前台改了时间保存后会出现Could not convert variant of type(String) into type(Date)错误,这句话上面是一个插入操作,用了DateToStr或DateTimeToStr转换都不行,求高手解答上面那句话改怎么写?????

作者: hu070309   发布时间: 2011-10-17

本来就是STRING类型,为什么还要用datetostr?
这和数据库里的数据类型没有关系的.
Could not convert variant of type(String) into type(Date) 的意思就是不能变STRING类型的变体类型转化为DATE类型啊.

作者: jfhyn   发布时间: 2011-10-17

热门下载

更多