问题这样,在sql数据库表中有几个字段属于int型,想在程序取出来应该怎么做
var
x:integer;
.......
str:='select * from table where (name:='''+ll+''')';
open;
x:fieldbyname('为整型的字段名').asstring;这样可不可以,因为asstring是不是作为string 型取得的?我不知道,所以请教
还有另一个有一个float型数据x,想把它插入到表中去,该怎么做因为
str:='insert into table('column1','column2'...) values column1='''+x+'''';这句似乎是插入字符串使用的,我不知道如果插入的是int ,float 这种应该怎么做,请大家帮帮忙
var
x:integer;
.......
str:='select * from table where (name:='''+ll+''')';
open;
x:fieldbyname('为整型的字段名').asstring;这样可不可以,因为asstring是不是作为string 型取得的?我不知道,所以请教
还有另一个有一个float型数据x,想把它插入到表中去,该怎么做因为
str:='insert into table('column1','column2'...) values column1='''+x+'''';这句似乎是插入字符串使用的,我不知道如果插入的是int ,float 这种应该怎么做,请大家帮帮忙
解决方案 »
- #######Socket的Time_Wait问题,帮顶有分,路过有分,解决了另开贴送分,:)######
- 如何获取其他应用程序句柄
- 我想学DEPHI,谁能给我提供最基础的学习资料!先谢谢了!
- Delphi中有实现h323协议栈的开发包吗?
- 代码优化
- ●拜托各位大G,怎样实现像QQ那样的浮动窗体?
- 通过Delphi调用chm新型帮助文件
- 我的程序在win98下调用的RASAPI32.dll中的拨号函数拨号,一切正常!而在win2000下却出错提示:找不到RASAPI32.DLL?????
- 如何向QRrichtext中添加打印内容?
- 求助Delphi高手
- 一个关于DLL编写的问题。急呀!!!
- 如何设计这样的一个动态算法啊?
str:= 'select * from table where name= '''+ll+ '''';
x:fieldbyname( '为整型的字段名 ').asinteger;
str:= 'insert into table( 'column1 ', 'column2 '...) values column1= '''+floattostr(x)+'''';