|
QTP连接数MYSQL数据库,查询代码如下:
Set Rs = CreateObject ("ADODB.Recordset" )
set rs= conn.Execute("select * FROM TB_CASH_LEDGER c,TB_PAYMENTMETHOD p,TB_ACCOUNT a WHERE a.SACCOUNTCODEHIGH IN('cash_ag','mml')AND c.NLEDGERPAYMENTMETHOD = p.NPAYMENTMETHODINDEX AND c.SLEDGERACCOUNTCODE = a.SACCOUNTCODE AND c.DTLEDGERDATECREATED>='2006-11-30 00:00:00'AND c.DTLEDGERDATECREATED<='2006-12-01 23:59:59'AND c.SLEDGERACCOUNTCODE like 'cpx089214%'ORDER BY c.SLEDGERACCOUNTCODE DESC ")
test1 = rs("NLEDGERINDEX").Value
执行到“test1 = rs("NLEDGERINDEX").Value”提示"[Microsoft][ODBC 驱动程序管理器] 程序类型越界"如附件
字段“NLEDGERINDEX”对应的是表“TB_CASH_LEDGER”
如果修改“test1 = rs("c.NLEDGERINDEX").Value” 提示"在对应所需名称或序数的集合中,未找到项目。"
[ 本帖最后由 netsky_lt 于 2006-12-5 17:09 编辑 ] |
|