Link to home
Start Free TrialLog in
Avatar of garethtnash
garethtnashFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Microsoft VBScript compilation error '800a0401'

Hello,

I'm getting the following error --

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/Connections/arecruta2.asp, line 84

Dim LiveAdverts = arrStats(0,0)


What I have done wrong with my code?

Here it is -

<%
set CMDStats = Server.CreateObject("ADODB.Command")
CMDStats.ActiveConnection = MM_recruta2_STRING
CMDStats.CommandText = "dbo.AdminGroupStats"
CMDStats.CommandType = 4
CMDStats.CommandTimeout = 0
CMDStats.Prepared = true
CMDStats.Parameters.Append CMDStats.CreateParameter("@RETURN_VALUE", 3, 4)
set GroupStats = CMDStats.Execute
GroupStats_numRows = 0

arrStats = GroupStats.GetRows() 'Get the results into a 2-dimensional array
			
GroupStats.Close() 'Clean Up
GroupStats Jobs = Nothing 'Clean Up
Set CMDStats = Nothing 'Clean Up

Dim LiveAdverts = arrStats(0,0)
Dim Advertisers = arrStats(1,0)
Dim MonthApps = arrStats(2,0)
Dim MonthRegs = arrStats(3,0)
Dim TotalRegs = arrStats(4,0)
Dim JBEMonth = arrStats(5,0)
Dim TotalCVs = arrStats(6,0)

Erase arrStats 'Release the array from memory

%>

Open in new window

Avatar of JAN PAKULA
JAN PAKULA
Flag of United Kingdom of Great Britain and Northern Ireland image

can you show us this file

arecruta2.asp
Avatar of garethtnash

ASKER

sure, here you go --

<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO" 
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_recruta2_STRING
MM_recruta2_STRING = "Provider= SQLOLEDB; Data Source=111.111.111.111,1433; Database=dbase;uid=usrid;pwd=pwds;"



Dim CMDIpCheck__ip
CMDIpCheck__ip = NULL
if(Request.ServerVariables("REMOTE_ADDR") <> "") then CMDIpCheck__ip = Request.ServerVariables("REMOTE_ADDR")

set CMDIpCheck = Server.CreateObject("ADODB.Command")
CMDIpCheck.ActiveConnection = MM_recruta2_STRING
CMDIpCheck.CommandText = "dbo.DashboardIPCheck"
CMDIpCheck.CommandType = 4
CMDIpCheck.CommandTimeout = 0
CMDIpCheck.Prepared = true
CMDIpCheck.Parameters.Append CMDIpCheck.CreateParameter("@RETURN_VALUE", 3, 4)
CMDIpCheck.Parameters.Append CMDIpCheck.CreateParameter("@ip", 200, 1,15,CMDIpCheck__ip)
set ip = CMDIpCheck.Execute
ip_numRows = 0

IF ip("access") = 0 then
Response.Status = "404" 
Response.Redirect("index.html")
End if

ip.Close()
Set ip = Nothing
Set CMDIpCheck = Nothing

Dim DashLogin__username
DashLogin__username = NULL
if(Session("UN") <> "") then DashLogin__username = Session("UN")

Dim DashLogin__password
DashLogin__password = NULL
if(Session("PD") <> "") then DashLogin__password = Session("PD")

set DashLogin = Server.CreateObject("ADODB.Command")
DashLogin.ActiveConnection = MM_recruta2_STRING
DashLogin.CommandText = "dbo.DashboardLogin"
DashLogin.CommandType = 4
DashLogin.CommandTimeout = 0
DashLogin.Prepared = true
DashLogin.Parameters.Append DashLogin.CreateParameter("@RETURN_VALUE", 3, 4)
DashLogin.Parameters.Append DashLogin.CreateParameter("@username", 200, 1,100,DashLogin__username)
DashLogin.Parameters.Append DashLogin.CreateParameter("@password", 200, 1,100,DashLogin__password)
set Login = DashLogin.Execute
Login_numRows = 0

If Login.EOF Then
Response.Status = "404" 
Response.Redirect("/default.asp")
End if

Login.Close()
Set Login = Nothing
Set DashLogin = Nothing

%>
<%
set CMDStats = Server.CreateObject("ADODB.Command")
CMDStats.ActiveConnection = MM_recruta2_STRING
CMDStats.CommandText = "dbo.AdminGroupStats"
CMDStats.CommandType = 4
CMDStats.CommandTimeout = 0
CMDStats.Prepared = true
CMDStats.Parameters.Append CMDStats.CreateParameter("@RETURN_VALUE", 3, 4)
set GroupStats = CMDStats.Execute
GroupStats_numRows = 0

arrStats = GroupStats.GetRows() 'Get the results into a 2-dimensional array
			
GroupStats.Close() 'Clean Up
GroupStats Jobs = Nothing 'Clean Up
Set CMDStats = Nothing 'Clean Up

Dim LiveAdverts = arrStats(0,0)
Dim Advertisers = arrStats(1,0)
Dim MonthApps = arrStats(2,0)
Dim MonthRegs = arrStats(3,0)
Dim TotalRegs = arrStats(4,0)
Dim JBEMonth = arrStats(5,0)
Dim TotalCVs = arrStats(6,0)

Erase arrStats 'Release the array from memory

%>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you
Avatar of Bill Prew
Bill Prew

Welcome, glad I could help.

~bp