Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
glafontaine
Starting Member
5 Posts |
Posted - 2007-08-22 : 13:04:12
|
Hi,I haven’t been able to get this working and at this point I lost hope and require help. Here is a bit of my code, all I want is the total number of records this gets. recordcount and count do not work with command and I have also tried with rs but no success. My result page displays correctly so the sql, ADO, asp everything works and I was able to display x per page but unable to get total records.Thank you<%Dim varDim var_cmdDim var_numRowsSet var_cmd = Server.CreateObject ("ADODB.Command")var_cmd.ActiveConnection = db_STRINGvar_cmd.CommandText = "SELECT from 4 diff tables with innerjoins"Dim var__MMColParam1 var__MMColParam1 = Request.QueryString("Id") var_cmd.CommandText = var_cmd.CommandText + " AND Id2 LIKE ?" var_cmd.Parameters.Append var_cmd.CreateParameter("param1", 5, 1, -1, var__MMColParam1) ' adDoubleDim var__MMColParam2 var__MMColParam2 = Request.QueryString("Id3") var_cmd.CommandText = var_cmd.CommandText + " AND Id3 LIKE ?" var_cmd.Parameters.Append var_cmd.CreateParameter("param2", 5, 1, -1, var__MMColParam2) ' adDoubleetc for 6 paramatersSet var = var_cmd.Executevar_numRows = 0%> |
|
|
|
|