SQL.Add('INSERT INTO MIDTABLE2(部门描述,销售)');
SQL.Add('VALUES(:Class,:xs)');
ParamByName('Class').AsString := '部门';
ParamByName('xse').AsFloat := czdate;
ExecSql;在query中可以这样用,在adoquery中呢?谢谢
SQL.Add('VALUES(:Class,:xs)');
ParamByName('Class').AsString := '部门';
ParamByName('xse').AsFloat := czdate;
ExecSql;在query中可以这样用,在adoquery中呢?谢谢
解决方案 »
- 用timer控件每隔10秒执行一次线程 怎么解决 ? 来都有分
- 需要dll封装form的应用级源码
- 如何让系统发出蜂鸣声
- 关于用代码打开Internet信息管理器,并使之最大化的问题!
- FreeLibrary 函数退出时提示地址访问出错,DLL中用了DataSetProvider,有没有办法解决?
- splitter当它align 属性是alleft时,运行之后会有两个splitter出现,
- 请教TIdHttp组件的用法!
- 我有个应用程序和数据库的问题。请高手指教一下。
- 如何顯示隱藏中的頁面的文本????
- 如何进行PageControl1控件内部的页面切换?
- 如何在报表中把checkbox打印出来?50分.
- 有一个软件系统要卖!!!!!!
SQL.Add('INSERT INTO MIDTABLE2(部门描述,销售)');
SQL.Add(' VALUES(:Class,:xs)');
Parameters.ParambyName('Class').AsString := '部门';
Parameters.ParambyName('xse').AsFloat := czdate;
ExecSql;
ADOquery.Parameters.ParamByName('xs').Value:=czdate;
SQL.Add(' VALUES(:Class,:xs)');
Parameters.ParambyName('Class').Value:= '部门';
Parameters.ParambyName('xse').Value:= czdate;
ExecSql;
2.AdoQuery的ParamByName后面只有.VALUE...没有Query的.ASSTRING,ASINTEGER之分
Parameters.ParambyName('aa').Value :=
begin
SQL.Add('INSERT INTO MIDTABLE2(部门描述,销售)');
SQL.Add(' VALUES(:Class,:xs)');
Parameters.ParambyName('Class').AsString := '部门';
Parameters.ParambyName('xse').AsFloat := czdate;
ExecSql;
end;
ADOquery.Parameters.ParamByName('xs').Value:=czdate;
以上的代码为:SQL.Add('INSERT INTO MIDTABLE2 (部门描述,销售)');
SQL.Add(' VALUES (:Class,:xs)');
ADOQuery1.Parameters.ParamByName('Class').Value := '部门';
ADOQuery1.Parameters.ParamByName('xse').Value := czdate;
try ExecSql;
SQL.Add(' VALUES (:Class,:xs)');
ADOQuery1.Parameters.ParamByName('Class').Value := '部门';
ADOQuery1.Parameters.ParamByName('xse').Value := czdate;
try
Prepared;
ExecSql;
ShowMessage('成功');
except
on e: Exception do
begin
ShowMessage('出错');
end;
end;