select aa.nextval as temp from dual

8088 2003-09-12 01:06:33
怎么取得值?数据库用ADO连接,查询用adoquery。
...全文
126 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
yanlls 2003-09-12
  • 打赏
  • 举报
回复
'temp'是数据库关键字,建议改用其它名称或[temp]
IwantFlay 2003-09-12
  • 打赏
  • 举报
回复
对不起,没看清楚,更正一下:
adoquery1.close;
adoquery1.sql.text:='select aa.nextval as f_temp from dual';
adoquery1.open;
ShowMessage(adoquery1.FieldByName('f_Temp').AsString);

上面的代码没有道理不行的呀。。
IwantFlay 2003-09-12
  • 打赏
  • 举报
回复
adoquery1.close;
adoquery1.sql.text:='select aa.nextval f_temp from dual aa ';
adoquery1.open;
ShowMessage(adoquery1.FieldByName('f_Temp').AsString);
应该没问题了
Drate 2003-09-12
  • 打赏
  • 举报
回复
adoquery1.close;
adoquery1.sql.text:='select aa.nextval f_temp from dual';
adoquery1.open;
ShowMessage(adoquery1.FieldByName('f_Temp').AsString);

上面的代码没有道理不行的呀。。
IORILI 2003-09-12
  • 打赏
  • 举报
回复
取一条记录中所有数据
adoquery.close;
adoquery.sql.text:='select aa.nextval as temp from dual';
adoquery.open;
for i:=0 to table1.Fields.Count-1 do
ShowMessage(adoquery.Fields[i].AsString);


8088 2003-09-12
  • 打赏
  • 举报
回复
提示我fieled 'temp' not found???
madyak 2003-09-12
  • 打赏
  • 举报
回复
取第一条:
adoquery.close;
adoquery.sql.text:='select aa.nextval as temp from dual';
adoquery.open;
ShowMessage(adoquery.FieldByName('Temp').AsString);

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧