|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Count of rs results
I have the following Query
SQL = "SELECT tblplayers.PlayerID, p_Fname, p_Sname, Bid_close_date, MAX(tblBid.BiddedPrice) As asMaxbid, MAX(tblBid.DateStamp) As MaxDateStamp FROM tblBid, tblplayers WHERE tblBid.PlayerID = tblplayers.PlayerID and tblplayers.Bid_close_date < # " & NOW & " # GROUP BY p_Fname, p_Sname, Bid_close_date, tblplayers.PlayerID ORDER BY Bid_close_date DESC;" I have tried to do a count on this but cannot for te life of me get it to work. Has anyone got any ideas?? Is it possible to do a count when the SqL has got a Max() in it? ANy suggestions would be much appreciated. David |
|
#2
|
|||
|
|||
|
HI
If U want to count records content in recordset U can try this (ASP): '------------------- <% set RS = Server.CreateObject("ADODB.Recordset") RS.ActiveConnection = "dsn="&varDBName&";uid="&varDBuser&";pwd="&varpvd RS.Source = SQL 'Your command string RS.CursorType = 1 RS.CursorLocation = 2 RS.LockType = 3 RS.Open RS_numRows = 0 'The answer is NumberOfRecords=RS.recordCount %> '-------------------- this should solve BYE |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Count of rs results |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|