Hello,
I am ecountering a serious error that I believe is beyond the capabilities of classic ASP. I hope someone has a solution and can help me. I do not want to have to re-code my script in a different language.
I'm using a 3rd party search engine (not MS Full-Text) to perform full text searches against a pretty big MS-SQL database. The database contains many tables with the same structure (same columns). The problem IS NOT in the MS-SQL database, SQL programming, or the third party Search Engine. The problem is in the ASP code when manipulating the database results AFTER the engine successfully returns all database results to the ASP script after the query is done.
The third party search engine sends every record back to the ASP script with a RANK number. Every record returned in the recordset has an assigned rank number for ordering the results. Let's call this number RANK. When submitting a query I am using a While loop to retrieve results from multiple tables in the database for the same keyword query. Searching the multiple tables is done using a WHILE loop and seperate recordsets with all records having the RANK number are returned. There is NO UNION available. There is NO problems in the ASP up to this point.
Although I am searching multiple tables in the database the ASP script I am developing will display all results in ONE list and ordered by the RANK number.
I created a two-dimensional array to keep a pair of values retrieved from the While loop. The pair was 'RANK-INDEX'. After that i applied the QuickSort algorithm to re-order original results by 'RANK'.
The problem is the following: Declaring a two-dimensional array by setting a precise range of values for each dimension either with Dim or ReDim leads to two options:
either the results retrieved from the database are over the upper bound of the array, or, if we assign numbers that are too big for these dimensions, the QuickSort algorithm returns the 'out of stack' error.
Is there a way to dynamically build such a two dimensional array (something similar with Split function for one dimension arrays)? Thank you.
I am ecountering a serious error that I believe is beyond the capabilities of classic ASP. I hope someone has a solution and can help me. I do not want to have to re-code my script in a different language.
I'm using a 3rd party search engine (not MS Full-Text) to perform full text searches against a pretty big MS-SQL database. The database contains many tables with the same structure (same columns). The problem IS NOT in the MS-SQL database, SQL programming, or the third party Search Engine. The problem is in the ASP code when manipulating the database results AFTER the engine successfully returns all database results to the ASP script after the query is done.
The third party search engine sends every record back to the ASP script with a RANK number. Every record returned in the recordset has an assigned rank number for ordering the results. Let's call this number RANK. When submitting a query I am using a While loop to retrieve results from multiple tables in the database for the same keyword query. Searching the multiple tables is done using a WHILE loop and seperate recordsets with all records having the RANK number are returned. There is NO UNION available. There is NO problems in the ASP up to this point.
Although I am searching multiple tables in the database the ASP script I am developing will display all results in ONE list and ordered by the RANK number.
I created a two-dimensional array to keep a pair of values retrieved from the While loop. The pair was 'RANK-INDEX'. After that i applied the QuickSort algorithm to re-order original results by 'RANK'.
The problem is the following: Declaring a two-dimensional array by setting a precise range of values for each dimension either with Dim or ReDim leads to two options:
either the results retrieved from the database are over the upper bound of the array, or, if we assign numbers that are too big for these dimensions, the QuickSort algorithm returns the 'out of stack' error.
Is there a way to dynamically build such a two dimensional array (something similar with Split function for one dimension arrays)? Thank you.