易截截图软件、单文件、免安装、纯绿色、仅160KB

在一张access表中嵌套查询

strSQLCmd.Format(_T("select * from (select * from talk_info where %s ='%s') where %s ='%s'"),
strVar,strValue,strVar2,strValue2);
请问这语句有问题吗
没有问题。

建议你通过调试把这个  ("select * from (select * from talk_info where %s ='%s') where %s ='%s'"),strVar,strValue,strVar2,strValue2)
输出看一下结果是什么? 估计你的变量有问题。

strSQLCmd内容是什么

CString strSQLCmd;
是不是变量的值代进去是这中形式啊:strSQLCmd.Format(_T("select * from (select * from talk_info where strVar ='strValue') where strVar2 ='strValue2'");



相关问答:

asp代码,access数据库,查询问题

数据库表名为:table1
其中一个字段名为:name1

name1 中内容可能是:你 好
注:“你好”这两个字中间的空格不能确定多少个

请问怎么才能当输入“你好”这两个字的时候,可以查询出含有“你&nbs ......

asp跟Access数据连接问题。

IsSqlDataBase = 0 '主数据库类型(1=SQL,0=AC)

'===========================================================================
SqlDatabaseName = "ads365" '主数据库名
S ......

一个最简单的asp链接access数据库脚本就是无法显示...

HTML code:
<HTML>
<HEAD>
<TITLE>Information Display</TITLE>
</HEAD>
<BODY>
<%
Dim conn
set conn=server.createobject ("adodb.connection")
conn ......

ACCESS数据库 做分页写SQL的问题

select top 20 * from tb
where 字段名 not in
(select top 10 字段名 from tb)

我知道用这种方法可以得到10-20的数据
但是如果数据很多
比如select top 100020 * from tb
where 字段名 not ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号