Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SELECT COUNT not counting always gives value of 1

Status
Not open for further replies.

gavray

Programmer
Jul 17, 2000
65
GB
Hi,

I've just converted from MS ACCESS and understand that u can't use rs.REcordcount to get the number of values in a field. I've got the code below which gives me the value 1 for all cases when they range from 1 to 10, in many instances.

sql2 = "SELECT ID,SongView,Song,Count(ID) AS num FROM SongTable"
sql2=sql2 & " WHERE myID = "&myID
sql2=sql2 & " AND LiveSong=1"
sql2=sql2 & " Group by SongView,Song"

numberofsongs=rs("num")

Any ideas please,

Many Thanks

Gavin
[afro2]
the boho from soho
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top