Hi, All
I am losing my hair here! And, would greatly appreciate some insight into this error:
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'UBOUND'
I have searched high and low with out progress. I am using Oracle 8.1.7, the table(Destination) has 2 columns(DestinationID[CHAR3],Country[VARCHAR20]) Thanks in advance! The code:
<% @ language="vbscript" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Using an Array With a Recordset</title>
</head>
<body>
<center>
<h2>Using an Array With a Recordset</h2>
</center>
<%
DIM oDBConnection,oRecordSet,oArray
SET oDBConnection = SERVER.CREATEOBJECT("ADODB.Connection"
oDBConnection.Open "dsn=OraDev;UID=scott;PWD=tiger;"
'the following creates a recordset object and recordset at the same time
SET oRecordSet = oDBConnection.EXECUTE("SELECT * FROM Destination"
'if there are any records in the recordset, use the getrows method to
'insert inot array
IF NOT oRecordSet.EOF AND oRecordSet.BOF THEN
oArray=oRecordSet.GetRows( )
END IF
%>
<table>
<%
FOR iRow=0 TO UBOUND(oArray,2)
%>
<tr>
<%
FOR jCol=0 TO 1
%>
<td>
<%= oArray(jCol,iRow) %>
</td>
<% NEXT %>
</tr>
<% NEXT %>
</table>
</body>
</html>
I am losing my hair here! And, would greatly appreciate some insight into this error:
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'UBOUND'
I have searched high and low with out progress. I am using Oracle 8.1.7, the table(Destination) has 2 columns(DestinationID[CHAR3],Country[VARCHAR20]) Thanks in advance! The code:
<% @ language="vbscript" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Using an Array With a Recordset</title>
</head>
<body>
<center>
<h2>Using an Array With a Recordset</h2>
</center>
<%
DIM oDBConnection,oRecordSet,oArray
SET oDBConnection = SERVER.CREATEOBJECT("ADODB.Connection"
oDBConnection.Open "dsn=OraDev;UID=scott;PWD=tiger;"
'the following creates a recordset object and recordset at the same time
SET oRecordSet = oDBConnection.EXECUTE("SELECT * FROM Destination"
'if there are any records in the recordset, use the getrows method to
'insert inot array
IF NOT oRecordSet.EOF AND oRecordSet.BOF THEN
oArray=oRecordSet.GetRows( )
END IF
%>
<table>
<%
FOR iRow=0 TO UBOUND(oArray,2)
%>
<tr>
<%
FOR jCol=0 TO 1
%>
<td>
<%= oArray(jCol,iRow) %>
</td>
<% NEXT %>
</tr>
<% NEXT %>
</table>
</body>
</html>