Getting "2014: Cannot execute queries while other unbuffered queries are active."

I am getting this error in my onload event although it looks like it completed successfully. This is the code I have where the error is generated:

onLoad
//************************************************** **************************************************
//* GET FILE FIELD DATA *
//************************************************** **************************************************
sc_lookup(rsData, “CALL stProc_GetCategiryID(’{Field_Category}’)”, “conn_mysql_dbrecipesupporttables”);
{Field_LinkCategory} = {rsData[0][0]};

sc_lookup(rsData, “CALL stProc_GetSubCategiries({Field_LinkCategory})”, “conn_mysql_dbrecipesupporttables”);
{Field_SubCategory} = {rsData[0][0]};

And the full error message:
(pdo-mysql): CALL stProc_GetSubCategiries(1 ) [HR][/HR]2014: Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.
ADOConnection._Execute(CALL stProc_GetSubCategiries(1 ), false) % line 1098, file: adodb.inc.php ADOConnection.Execute(CALL stProc_GetSubCategiries(1 )) % line 4613, file: RecipeEditorProperties_Editor_apl.php RecipeEditorProperties_Editor_apl.nm_proc_onload() % line 5732, file: RecipeEditorProperties_Editor_apl.php RecipeEditorProperties_Editor_apl.nm_acessa_banco( ) % line 1600, file: RecipeEditorProperties_Editor_apl.php RecipeEditorProperties_Editor_apl.controle() % line 2083, file: index.php Now for the Procedure I call it is this: BEGIN
SELECT SubCategory
FROM tbllistrecipesubcategories
WHERE CodeSequence = iLinkCategory;
END

I prefer using Stored Procedures because then there is much less code in the events. And if I call the Procedures from another event then the coding is reduced.
I notice the “,false” above. Does this mean that I need an OUT parameter? How would I write it because the SubCategories would be a string array?

I was able to come up with an answer, but do not necessarily like it. It does work, however to address the FETCHALL error 204 I was getting. I went to my SubCategory field and did an sc_lookup with two parameters and got the error when I would CALL a MYSQL Stored Procedure. So I tried placing the Stored Procedure code minus the BEGIN/END directly in the sc_lookup macro code. And it worked!

Here is the code I used: sc_lookup(rsData, “SELECT CodeSequence,
SubCategory,
Description,
LinkSequence,
LinkCategory
FROM tbllistrecipesubcategories
WHERE (’{Field_SubCategory}’ = SubCategory AND
‘{Field_LinkCategory}’ = LinkCategory)”,
“conn_mysql_dbrecipesupporttables”);
{Field_LinkSubCategory} = {rsData[0][0]}; // SubCategory Link

Now I DO NOT GET any errors. It seams that for some reason calling a MYSQL stored procedure was the issue. So I will create a function and call it to see if the fetchall error comes up. If it doesn’t then this means there is some issue calling Stored procedures from within Scriptcase. There are work-arounds, but it is something to note.

SOLVED - It turns out that I need to create a second connection to the database. Example RSData1 and rsData2. rsData1 has one connection and rsData2 has a second connection. No errors. This is not quite clear when you go through the Forums. A lot of trial and error. Maybe Scriptcase could make this a bit more clear by creating a video on it.