Those were all great suggestions. I checked the security and it is good. I am using a secondary connection and querying it via JScript.
I did try the final suggestion of recreating a form. I got a new error message:
The following error occurred:
'XDocument.DOM.selectSingleNode(...)' is null or not an object
File:script.js
Line:86
I checked to see if my code was sending correct values by setting a XDocument.UI.Alert. The form sees the original variable value (xxxx). It sends the correct SQL to the database. But the database returns no values.
I can forward the form and jscript if you would like to see it.