By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,867 Members | 1,981 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,867 IT Pros & Developers. It's quick & easy.

query to count records

P: 273
code works fine it's counts the records but not bring updated record?

is there any other way to count records ?
Expand|Select|Wrap|Line Numbers
  1. Set rs = Server.CreateObject("ADODB.Recordset")      
  2. strSQL = "SELECT sum(qanty) as Count from itemsOrd WHERE orderID = " & OrderID
  3.     rs.Open strSQL, conn, _
  4.     adOpenStatic, adLockOptimistic
  5.     numitems = rs("Count")
  6.     response.write numitems
result showing
if i add 10 it's showing 1?
Oct 4 '12 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 10K+
P: 12,370
I don't know what you're trying to say. You say you're trying to use a count, but then you use a sum instead of a count. You mention updating some record but you don't say what you're updating or how/when/why you're updating and the effects that's supposed to have. You mention adding 10 something but you don't say how/when/why/what you're adding.
Oct 4 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.