sql - Classic ASP check with result set changes -


I hope I can tell the meaning!

I have a SQL query that was created as a view to make data easier to pull.

However, I have a one-week number column that gets the date and then calculates the week number. I have everything in an FPDF document, but after changing the number of weeks I need to divide the cells, then display the total for the number of that week.

How will I check when changes in the column of the week? I can not think about its solution

This is the code that does not currently work, there is a very high likelihood that this is not correct.

  If iCounter & gt; 1 then Newsm = RS ("W"), the RSSSSS SSS SSSSSSSS. Sss (Newsum, RS ("W")) = 1 Then PDF.CL 15,5, "EOM", 1,1, "C", 1 other RS.movenext pdf.Cell 15,5, "", 1,1 , "C", 1 end if the end  

In this scenario, There are different ways for me personally, I've always found it to be much easier and more efficient and using ADODB.Recordset by using the array.

Once you have the ADODB.Recordset object, regardless of the approach (this is ADODB.Command , Recordset.Open ( ) or connection.Execute () ) You can call it Recordset.GetRows () .

can convert to a two-dimensional array I will create your code in this way;

Please note that it is unwanted and coded with memory, I want to tell you in general how to calculate this kind of a classic ASP environment.

.. 'Change into an Array variable (if not rs.EOF) then data = rs.GetRows ()' Close the memory and release the resize call rs.Close () Set rs = nothing if Christians (data) ) Then Rows = Ubounds (Data, 2) 'Repeat through the array for line = 0 for the line' your results Sector does not consider a column before the column. Weekly = Data (0, line) If Week = = Existing_One then increase the total for our current sum by 1. Total_wecno = Total_week number + 1 other 'Place logic to add new row to PDF Use the Total_Vikeano to display the increased total. 'Reset total_weekno for new current week later. Total_weekno = 0 'Our week has changed so much that in the current week Current_weekno = weekno end if the next end if

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -