Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

form parameter sent to ms sql WHERE clause fails in idc & iis

Status
Not open for further replies.

pipemole

Programmer
May 9, 2003
19
0
0
IE
Hello.
I have a MS Sql 7 database table to query. The where clause of the select statement is to receive parameters from a web page form. Web service is by IIS 4 on an NT Server 4. Internet Database Connector, along with its .idc and .htx files are used. The html form sends parameter by select option listing.
The problem is that match attempts from the data base fail when using chosen syntax in idc file. I tried both = and like .

+from wigitdb.dbo.tblnumthree
+where prdate like '<%pdate%>'

It did work, though, with a string value typed in the .idc file instead of a string parameter.
+where prdate = '1989'

Code in the .htx file has lines to echo the parameter from the form to verify it was sent.
<p>;<%idc.pdate%>;</p><p> <b>Your Query Results<b></p>
In browser at run time the parameter sent from form appears to arrive
;1992;
Your Query Results
Thus I was able to check number of characters arriving by the time the htx file is reached.
Note also the table header definition of column names and types has:
[prdate] char(4) NULL ,
while the pull down option selection has

<select name = &quot;pdate&quot; font size=&quot;1&quot;>
<option selected = &quot;&quot;> Select Year </option>

<option> 1991 </option>
<option> 1990 </option>
<option> 1989 </option>

Thanks for assistance.
Fri.5/9/2003; 3:45 PM EDT;
p.s.; in searching forums by key-words, I saw messages indicating IDC was old tech. Never the less, what are clues to get this present project debugged?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top