Why is this returning 0's????

Results 1 to 2 of 2

Thread: Why is this returning 0's????

  1. #1
    bmurray Guest

    Default Why is this returning 0's????

    When I try to count the records in a table and put the count into another row of another table all I get are 0&#039;s. Here is the query that I used:<BR><BR>strQuery6="Select Count(*) as a FROM CFSCCA where [CCALocation] = &#039;" & ThisLocation & "&#039; and [CCAOffense] = &#039;" & ThisOffense & "&#039; and Year([CFSDate]) = &#039;" & ThisYear1 & "&#039;"<BR><BR>Here is the code where I run the query and try to enter the values into another table:<BR><BR>objRS3.MoveFirst<BR>objRS4.MoveFirst <BR>Do While Not objRS4.EOF<BR> objRS3.MoveFirst<BR> ColumnNumber = 1<BR> ThisOffense = objRS4("Type")<BR> objRS.AddNew<BR> Do While Not objRS3.EOF<BR> ThisLocation = objRS3("Type")<BR> objRS("Offense") = objRS4("Type")<BR> set objRS6=objConn.Execute(strQuery6)<BR> objRS("L1Y1") = objRS6("a")<BR> <BR> Response.Write (objRS6("a"))<BR> ColumnNumber = ColumnNumber + 1<BR> objRS3.MoveNext<BR> <BR> Loop<BR> objRS.Update<BR> objRS4.MoveNext<BR>Loop<BR><BR>I do "Response.Write (objRS6("a"))" to see what it is that I am getting. The table has numbers in it, but all I get are 0&#039;s.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Why is this returning 0's????

    Have you tried running that query in analyzer? do you get back records?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts