# Re: 简单搜寻的问题......

Posted by styler on October 12, 1999 at 16:24:55:

In Reply to: 简单搜寻的问题...... posted by 初学者 on October 12, 1999 at 14:48:02:

: 请问各位网友:
: 我有一个整数型态的变数(temp),我要如何撰写sql语法,才能搜寻此变数所存之值.....ex:"select * from dbname where filesname=temp"
: ~~~~~~~~~~~~~~~~
: 在上述标底线的地方应如何写呢??????谢谢.....
数值型态时
SQL = "select * from dbname where filesname= " & temp
字串型态时(加单引号)
SQL = "select * from dbname where filesname= '" & temp & "'"
若为日期型态则将单引号(') 改为 井字号 (#)

Follow Ups: