B
Brian Piotrowski
Hi All,
I'm wondering if a fresh set of eyes can help me with this program. In my
program, it queries an iSeries database to retrieve a code and count for a
series of records. When I run the code in ASP with an entered date, I get a
"no records" message back. However, if I take the SQL string and run it in
our interpreter, I get back a series of records. Can someone please have a
look and see if there is any obvious problems?
Thanks!
Brian.
CODE:
<% KLSA="select krcode,count(krcode) CA from spsl.kls_data where
concat(char(krdate), concat(' ',char(krtime))) > '" & sdate & " 15:31:00'
and concat(char(krdate), concat(' ',char(krtime))) < '" & edate & "
02:00:00' and kplcd='" & request.form("plantcode") & "' group by krcode"
Set rsKLSA = Server.CreateObject("ADODB.Recordset")
rsKLSA.Open KLSA, adoConA
If rsKLSA.eof = True Then
response.write("No Records")
Else
Do While rsKLSA.eof = False
response.write(rsKLSA("krcode") & ": " & rsKLSA("CA") & "<BR>")
rsKLSA.movenext
Loop
End if
%>
I'm wondering if a fresh set of eyes can help me with this program. In my
program, it queries an iSeries database to retrieve a code and count for a
series of records. When I run the code in ASP with an entered date, I get a
"no records" message back. However, if I take the SQL string and run it in
our interpreter, I get back a series of records. Can someone please have a
look and see if there is any obvious problems?
Thanks!
Brian.
CODE:
<% KLSA="select krcode,count(krcode) CA from spsl.kls_data where
concat(char(krdate), concat(' ',char(krtime))) > '" & sdate & " 15:31:00'
and concat(char(krdate), concat(' ',char(krtime))) < '" & edate & "
02:00:00' and kplcd='" & request.form("plantcode") & "' group by krcode"
Set rsKLSA = Server.CreateObject("ADODB.Recordset")
rsKLSA.Open KLSA, adoConA
If rsKLSA.eof = True Then
response.write("No Records")
Else
Do While rsKLSA.eof = False
response.write(rsKLSA("krcode") & ": " & rsKLSA("CA") & "<BR>")
rsKLSA.movenext
Loop
End if
%>