以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  请教:带参数的查询语句如何实现?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=92094)

--  作者:bahamute
--  发布时间:2016/10/26 9:13:00
--  请教:带参数的查询语句如何实现?
翻了好久帮助,也没找到说明。
--  作者:有点蓝
--  发布时间:2016/10/26 9:16:00
--  
狐表自带的实现不了,只能拼sql。



--  作者:bahamute
--  发布时间:2016/10/26 9:23:00
--  
如何拼法,请指教。
想把Uid和Pwd作为参数传递。

s e l e c t * from Users where Uid=\'1001\' and Pwd=\'123456\'
[此贴子已经被作者于2016/10/26 9:25:23编辑过]

--  作者:有点蓝
--  发布时间:2016/10/26 9:36:00
--  
参考:http://www.foxtable.com/webhelp/scr/1284.htm

dim id as string = "1001"
dim psw as string = "123"
dim sql as string = "s e l e c t * from Users where Uid=\'" & id & "\' and Pwd=\'" & psw & "\'"
msgbox(sql)