我用的是Delphi+ADO+Access,从A表select出四个字段的值,均为text类型,想写入B表,程序如何写。我运行时老说‘标准表达式中类型不匹配’。
解决方案 »
- 新手想做报表,有2个关于报表的问题
- memorystream内容增加问题
- !!!!!!!dxDBTreeList!!!!!!!!!!!!dxDBTreeList!!!!!!!!!!!!!!!dxDBTreeList!!!!!!!!!!!dxDBTreeList!!!!dxDBTreeList
- 如何使用AssignFile访问正在使用的 文本文件?
- 使用TADOQuery,调试过程中提示异常“EOleException '尚未调用CoInitialize' ”
- 我想从最基本的底层写http和ftp应用,不知从何入手,希望给点帮助
- 请问各位哪儿有超市管理的源程序?
- TCPView是用来做什么的?
- 无效的列名号X错误
- 关于组件Adoconnection的有关疑问?( 急急急!!!!)
- 关于数据库中表名查找的问题!
- 控件问题,进来看看吧,在线等待
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add( 'insert into B select b,c,d,e from A where b=207 and f=5');
ADOQuery1.ExecSQL;
运行时老说‘标准表达式中类型不匹配’
问题在哪里那
select b,c,d,e from A where b=207 and f=5
有错误
该成:ADOQuery1.SQL.Add( format('insert into B select b,c,d,e from A where b=%d and f=%d,[207,5]));
sqlstr:string;ADOQuery1.Close;
begin
sqlstr:='insert into B select b,c,d,e from A where b='+'''207'''+' and 'f='+'''5'''';
with ADOQuery1 do
begin
close;
SQL.Clear;
SQL.Add( sqlstr);
ExecSQL;
end;
已经调试通过,可以直接使用 :)
end;