I'm trying to do a simple query of an Oracle 10g database within some vbscript code.
<%
'Get protocol information to display in dropdown list
%>
<!--#include file="dbconnect2.inc"-->
<%
sql= "select DISTINCT PROTOCOLNAME FROM GPL_PPDB.VW_IVRS_INFO_2 WHERE SPONSORNAME = '" & Sponsor & "' ORDER BY PROTOCOLNAME ASC"
Set RS = Conn.Execute(sql)
%></span>
</font><span style="font-size: 9pt"><b><a href="new_capa_form.asp">Select a
different Sponsor?</a></b></span></td>
<td>
<p style="margin-top: 0; margin-bottom: 0">
<font color="#000000" style="font-size: 9pt"><b>Protocol:</b></font></td>
<td>
<p style="margin-top: 0; margin-bottom: 0">
<Select name="Protocol" onchange="Submit()" size="1" tabindex="3" style="font-size: 9; color: #000000">
<option>Select...</option>
<%
Do Until RS.eof
%>
<option>
<%
Response.write RS("PROTOCOLNAME")
%>
</option>
<%
RS.movenext
loop
RS.close
Set RS = nothing
Conn.close
Set Conn = Nothing
%>
</Select>
Problem is that for some reason the query will not compare the values in the SPONSORNAME column to the vbscript variable Sponsor. I don't get any errors, just no values are populated. If I change the query to use an actual sponsor name instead of the variable then the query returns values so it appears just to be a problem with the comparison of the Oracle 10g column info to a vbscript variable (which is definitely not null).
Any help would be appreciated.