Hi Guys,
I'm relatively new in the world of ASP, but that problem seems to be a bug.
I have a code to select records fom a database table. However if one of the fields contains a number whose last digit is a zero it generates an error. I attached the code and the table specification (an Oracle database).
So the only thing what I should change is the month value in the database from 10 to ex. 15
It's strange, isn't it...?
<%@ LANGUAGE=VBScript %>
<title>Prepaid hiváslista regisztrálás lekérdezés</title>
<HTML>
<BODY BGCOLOR=#EAEAEA>
<table border=0 cellspacing=0 cellpadding=0 WIDTH="100%">
<td>
<img width=225 src="./VBFlag25_P.jpg" >
</td>
<td>
<center><FONT SIZE=7><i>Prepaid híváslista regisztrálás</i></font></center>
</td>
</table>
<hr>
<br><br><br><br>
<CENTER><table border=1 cellspacing=0 cellpadding=0 WIDTH="60%">
<TR ALIGN=center><TD><B>Sorszám</B><TD><B>MSISDN</B><TD><B>Az igényelt híváslista éve</B><TD><B>Az igényelt híváslista hónapja<TD></B></TR>
<%
// -----------------------------------------------------
// The following code generates a database connection
// and collects the active records belonging to a
// prepaid subscriber.
// -----------------------------------------------------
Set OracleConn = Server.CreateObject("ADODB.Connection")
DSN="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
OracleConn.Open DSN
dtmVar = Now()
months = Array("Invalid","January","February","March","Apri l","May","June","July","August","September","Octob er","November","December")
'Instantiate a Recordset object.
Set rst2Requests = Server.CreateObject("ADODB.RecordSet")
'Open a recordset using the Open method
'and use the connection established by the Connection object.
strSQL = "SELECT MSISDN, PERIOD_YEAR, PERIOD_MONTH as MONTH from BSCCBS.Subscriber_invoice_request WHERE MSISDN="
strSQL = strSQL & Request.form("MSISDN")
Set rst2Requests = OracleConn.Execute(strSQL)
'rst2Requests.Open strSQL, OracleConn
'Cycle through record set and display the results
'and increment record position with MoveNext method.
Set objMSISDN = rst2Requests("MSISDN")
'Set objPERIOD_YEAR = rst2Requests("PERIOD_YEAR")
'Set objPERIOD_MONTH = rst2Requests("PERIOD_MONTH")
serialNumber = 0
Do Until (rst2Requests.EOF)
serialNumber = serialNumber + 1
Response.Write "<TR ALIGN=center>" & "<TD>" & serialNumber & "<TD>" & objMSISDN & "<TD>" & rst2Requests("PERIOD_YEAR") & "<TD>" & rst2Requests("MONTH").value & "</TR>"
rst2Requests.MoveNext
Loop
rst2Requests.Close
Set OracleConn = Nothing
%>
-------------------------------
CREATE TABLE SUBSCRIBER_INVOICE_REQUEST (
REQUEST_NUMBER NUMBER (10) DEFAULT 0 NOT NULL,
MSISDN VARCHAR2 (20) NOT NULL,
PERIOD_YEAR NUMBER (4) NOT NULL,
PERIOD_MONTH NUMBER (2) NOT NULL,
REGISTRATION_DATE DATE,
REGISTERED_BY VARCHAR2 (20),
LASER_FILE_FLAG VARCHAR2 (1) DEFAULT 'N' NOT NULL,
LASER_FILE_DATE DATE)