作者TonyQ (骨头)
看板Programming
标题Re: [问题] ASP连接资料库问题
时间Fri Nov 23 00:54:08 2007
※ 引述《Phizek ()》之铭言:
: Set rs1 = Server.CreateObject("ADODB.Recordset")
: If int(Request.QueryString("ID")) > 0 then
: SortSql1 = "Select * From news_detail where number ='"& Request.QueryString("ID")&"'"
: else
: SortSql1 = "Select * From news_detail where number = '001'"
: End if
: rs1.Open SortSql1, CN
: Count1=rs1.RecordCount
: -----------------------------------------------------------------
: 想请问一下RS可以抓到资料
: 为甚麽rs1都抓不到呢
: count1 的值为 -1
: 资料库确定是有东西的
: 请问一下该如何修改呢
: 谢谢 ^^
我记得recordCount这个资料不是很准确
以前在算的时候都是 select count(*) as Count from news_detail ....
然後再去取count栏位 , 一点经验啦 .... :P
详细情形也忘了,我只记得我现在都用这样的方式取count.
--
▄▅▆▇███▇▆▅▄▃ ╰┼╯─╮ ╮
◥███████████◣ ╰┼╯=│=│
◥██████───────◣ *. ╯ ╯ ╯ の 物 语 .*
◥███████──────◣ ~ ◢◣ ◢◣
◥██████───────◤ ◥◤* 空白的世界.翼
*◥◤
◥██▁▂▃▄▅▆▇███▆▅▄▃▂▂
~telnet://tony1223.no-ip.info
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.132.59.247