Welcome back Gramps,
sorry for the delay to respond but i had some troubles at work.
Let me introduce you to my usual debuging method for such issues.
First edit sc_classes.php and somewhere near line 580 you will see the line:
var myAjax = new Ajax.Request( url, { method: 'POST', parameters: pars, onComplete: onCompleteCallBack });
just before that add the following line:
$("dump_area").innerHTML = pars;
Next, in the page you placed select boxes, add somewhere a div
<div id="dump_area"></div>
Now refresh page and make a selection in the first box. In the div you will get parameter
string used to make ajax call to sc_select_ajax_handler.php.
Copy that and point your browser to sc_select_ajax_handler.php with that parameter string.
eg:
www.mydomain.com/plugins/sc_select_ajax_handler.php?linkval=2&table=lsd_demo_2&key=rec_id&text=descr&order=rec_id&extra_where=&select_prompt_text=Please Select&linkfld=parent_id&xml_encoding=ISO-8859-1
if it works you will get an xml document with select options for the second select box.
If you see strange messages "view source" to see the php error message.
This will give you information about the cause of the problem.
if that returns options for select box with out php error messages then db connection and parameters are correct.
Now next issue to check is if javascript points to the file correctly. Go back to sc_classes.php and change
$("dump_area").innerHTML = pars;
to
$("dump_area").innerHTML = url;
and refresh page and make a new selection (like before)
usually it is just sc_select_ajax_handler.php that means in root.
Those 2 things are usualy give me the solution.
And last note, openDB() sould not be commented in sc_select_ajax_handler.php because it is runned stand alone, no wordpress db connection present at that state.
If still you cant locate problem... i am here
best regards
panos