Hi guys,
I have an IF statement that is not executing properly inside a FOR Next loop. This if statement executes once and doesn't execute again even when the conditions are satisfied.
Below is the code
<% @Language="VBScript"%>
<%
Option Explicit
'declare all local variables
dim dcnDB, strSQL, rsData, i, Kount 'As ADO.Connection
dim arrSomething, strNTUser
'Create the Connection Object
Set dcnDB = Server.CreateObject("ADODB.Connection")
dcnDB.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;"_
& "Data Source=f:\Aspdatabase\Database\telecoms.mdb"
dcnDB.Open
arrSomething = split(Request.Form("Ans"), ",")
strNTUser = arrSomething(1)
Kount = 0
For i = 0 to 10
If Request.Form("Q"&i&"") = arrSomething(i) Then
Kount = Kount + 1
End if
Next
%>
I need your help
Larryman
Oysterbar ride to success. Keep Riding
I have an IF statement that is not executing properly inside a FOR Next loop. This if statement executes once and doesn't execute again even when the conditions are satisfied.
Below is the code
<% @Language="VBScript"%>
<%
Option Explicit
'declare all local variables
dim dcnDB, strSQL, rsData, i, Kount 'As ADO.Connection
dim arrSomething, strNTUser
'Create the Connection Object
Set dcnDB = Server.CreateObject("ADODB.Connection")
dcnDB.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;"_
& "Data Source=f:\Aspdatabase\Database\telecoms.mdb"
dcnDB.Open
arrSomething = split(Request.Form("Ans"), ",")
strNTUser = arrSomething(1)
Kount = 0
For i = 0 to 10
If Request.Form("Q"&i&"") = arrSomething(i) Then
Kount = Kount + 1
End if
Next
%>
I need your help
Larryman
Oysterbar ride to success. Keep Riding