473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ASP variable Oracle query

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.
Oct 28 '06 #1
1 2752
Figured it out. I just needed to trim the vbscript variable. There must have been spaces added by the people entering the data so this was causing the values to not match.
Oct 28 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: francis70 | last post by:
Hi, I have these 2 problem? Is there a way in Oracle to read UNCOMMITED data. i.e. in Oracle the normal behaviour is that a user's updates to a table are visible to other users ONLY when the...
4
by: Wayne Baswell | last post by:
I want to pass a date variable to a sql statement from Crystal Reports. The part of the query accepting the variables looks like: "Calendar_Date between To_Date('1-JUN-03','mm/dd/yy') and...
11
by: Markus Breuer | last post by:
I have a question about oracle commit and transactions. Following scenario: Process A performs a single sql-INSERT into a table and commits the transaction. Then he informs process B (ipc) to...
1
by: Cern | last post by:
Is it somebody out there who has made a migration from an Oracle server to an MySQL server?? The scenario is as simply: I've got a Oracle 8 server with a database with content that I want to...
1
by: k_mahesh7 | last post by:
I need tp bind a variable to a select and send to oracle database. I have the value to be send in a variable but that variable to be binded to the query as the database I an hitting is a siebel...
4
by: robboll | last post by:
When I try to use an append query from an oracle link it takes forever. I am exploring the idea of doing an append action using a pass-through query. If I have an Oracle ODBC connection to...
0
by: mikej | last post by:
Hi, I automated a process (using a recordable MACRO) in excell to open msaccess query and retrieve data (from an Oracle database) - said data then to be compared via VLOOKUP with data in a second...
7
by: trakal | last post by:
Hello everybody, i create a stored producedure in Oracle that will get the user name who connect to Oracle database. For exemple, i declare a variable "o_user" and i want to assign the value of the...
2
by: Vinod Sadanandan | last post by:
All, Below listed are the new features in Oracle 11g ,please join me in this discussion to generate a testcase and analyze each of the listed features . Precompilers:...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.