Redirect with VBScript - TechRepublic
General discussion
March 17, 2003 at 04:46 PM
gwhiting

Redirect with VBScript

by gwhiting . Updated 23 years, 3 months ago

I have a need to test my Database for more than one item, if so I go to one page else the second page. I have inclued the code below:
<% @language="vbscript" %>

<% Dim Recordset1__MM_ColParman Recordset1__MM_ColParman = "1" If (Request.QueryString("Grouping") <> “”) Then
Recordset1__MM_ColParman = Request.QueryString(“Grouping”)
End If
%>
<% Dim Recordset1 Dim Recordset1_numRows Set Recordset1 = Server.CreateObject("ADODB.Recordset") Recordset1.ActiveConnection = MM_ABBA_STRING Recordset1.Source = "SELECT Count(Distinct subgrpID) FROM tblsubgrouping WHERE grpID = '" + Replace(Recordset1__MM_ColParman, "'", "''") + "'" Recordset1.CursorType = 0 Recordset1.CursorLocation = 2 Recordset1.LockType = 1 Recordset1.Open() Recordset1_numRows = 0 %>
<% If (Recordset1.Fields.Item("Count(Distinct subgrpID)").Value) > 1 Then
Location.href = “http://www.Ambassadors.org”
End If
If (Recordset1.Fields.Item(“Count(DistinctsubgrpID)”).Value) = 1 Then
Location.href = “http://www.Compulink.net”
End If
%>


<% Recordset1.Close() %>

Thanks for your help….

gwhiting@compulink.net

This discussion is locked

All Comments