joseph_russell
04-27-2007, 09:23 PM
We upgraded our server from IIS 5.0/Win Serv 2K to IIS 6.0/Win Serv 2K3. After configuring IIS and transfering our website we're getting constant errors trying to run this page that has a good ammount of javascript on it. I'm going to put the pages up in hopes that someone can help me troubleshoot this issue.
error: "Object doesn't support this property or method" on line58 Char 12 of LoadAnything.htm
LoadAnything.htm (shortened to the function I'm having the error on)
<html>
<head>
<title></title></head>
<body>
<link rel="stylesheet" type="text/css" href="../../StyleSheets/WizardsSmall.css">
<form action method="POST" id="form1" name="form1">
<table WIDTH="75%" ALIGN="center" BORDER="1" CELLSPACING="1" CELLPADDING="1">
<tr><td align=center>
Select File to load<br>
<INPUT type="file" id=file1 name=file1><br><input type="button" value="Load file" id="button1" name="button1" onclick="LoadFile()">
</td></tr>
</table></form></body>
<object data="../../ServerIncludes/Scriptlets/FileRead.htm" id="FileReadLib" style="HEIGHT: 0px; LEFT: 0px; TOP: 0px; WIDTH: 0px" type="text/x-scriptlet" VIEWASTEXT></object>
<object data="../../ServerIncludes/Scriptlets/FileReadDOVs.htm" id="FileReadLibDOVs" style="HEIGHT: 0px; LEFT: 0px; TOP: 0px; WIDTH: 0px" type="text/x-scriptlet" VIEWASTEXT></object>
<link href="../../ServerIncludes/adojs.js">
<script LANGUAGE="javascript">
<!--
function LoadFile() {
var AName = document.forms[0].elements[0].value;
var TName = new String(AName);
var BName = TName.toUpperCase();
FileReadLib.LoadExtract(AName); }
//-->
</script>
</html>
FileRead.htm (shortened down to the function being called)
<html>
<object data="../../ServerIncludes/Scriptlets/Connect.asp" id="DataLib" style="HEIGHT: 0px; LEFT: 0px; TOP: 0px; WIDTH: 0px" type="text/x-scriptlet" VIEWASTEXT></object>
<object data="DateLib.htm" id="DateLib" style="HEIGHT: 0px; LEFT: 0px; TOP: 0px; WIDTH: 0px" type="text/x-scriptlet" VIEWASTEXT></object>
<script LANGUAGE="javascript">
<!--
function public_LoadExtract(FName) {
var TheFile, FileStrm;
var M_ssn, M_inits, M_Lname, M_Fname, M_DSSN, M_ruc, M_paycode;
var M_normamt, M_payamt, M_pgrp, M_poe, M_pltcd, Payrollnum, Payrolldate;
var Trash
LineNum = 1;
TheFile = new ActiveXObject("Scripting.FileSystemObject");
FileStrm = TheFile.OpenTextFile(FName,1,false);
// Setup the Database Connection
var SQLCommand, TheRS, TheConnection, DSNString, Commands, MyDC;
FieldNames = new Array("ssn","inits","lname","fname","dssn","ruc","cco",
"payamt","normamt","notsureone","pgrp","poe","pltcode","recstatus",
"paychgflg","paystatuscode","payrollnum","payrolldate");
// Connect the the Database
DataLib.ConToDB();
MyDC = DataLib.GetDC();
PString = prompt("Enter Payroll Number","025");
Payrollnum = parseInt(PString,10);
DString = prompt("Enter Payroll Date","20000101");
Payrolldate = DateLib.FromMil(DString);
var NumRecs = 0;
MyRS = DataLib.GetRS("SELECT * FROM CurExtract");
PayDay = parseInt(DString.substr(6,2),10);
while (! FileStrm.atEndOfStream)
{
What = FileStrm.Read(1);
if (What != '0' && ! FileStrm.atEndOfStream)
{ FileStrm.SkipLine(); }
else
{
if ( ! FileStrm.atEndOfStream)
{
M_ssn = parseInt(FileStrm.Read(9),10);
if (isNaN(M_ssn))
{ M_ssn = 0; }
M_inits = FileStrm.Read(3);
M_Lname = FileStrm.Read(20);
M_Fname = FileStrm.Read(10);
M_DSSN = parseInt(FileStrm.Read(4),10);
if (isNaN(M_DSSN))
{ M_DSSN = 0; }
M_ruc = parseInt(FileStrm.Read(5),10);
if (isNaN(M_ruc))
{ M_ruc = 0; }
M_tempruc = parseInt(FileStrm.Read(5),10);
if (isNaN(M_tempruc))
{ M_tempruc = 0; }
M_fapruc = parseInt(FileStrm.Read(5),10);
if (isNaN(M_fapruc))
{ M_fapruc = 0; }
M_adtempruc = parseInt(FileStrm.Read(5),10);
if (isNaN(M_adtempruc))
{ M_adtempruc = 0; }
M_cco = parseInt(FileStrm.Read(1),10);
if (isNaN(M_cco))
{ M_cco = 0; }
if ( PayDay > 1 && PayDay < 16 )
{
M_normamt = parseInt(FileStrm.Read(5),10);
if (isNaN(M_normamt))
{ M_normamt = 0; }
M_payamt = parseInt(FileStrm.Read(5),10);
if (isNaN(M_payamt))
{ M_payamt = 0; }
} else {
M_payamt = parseInt(FileStrm.Read(5),10);
if (isNaN(M_payamt)) { M_payamt = 0; }
M_normamt = parseInt(FileStrm.Read(5),10);
if (isNaN(M_normamt)) { M_normamt = 0; }
}
M_notsureone = FileStrm.Read(2);
M_pgrp = parseInt(FileStrm.Read(3),10);
if (isNaN(M_pgrp))
{ M_pgrp = 0; }
M_poe = parseInt(FileStrm.Read(5),10);
if (isNaN(M_poe))
{ M_poe = 0; }
M_pltcd = FileStrm.Read(4);
M_recstatus = FileStrm.Read(1);
M_paychgflg = FileStrm.Read(1);
M_paystatuscode = parseInt(FileStrm.Read(5),10);
if (isNaN(M_paystatuscode))
{ M_paystatuscode = 0; }
if (M_paystatuscode == 2100)
{
M_normamtTEMP = M_normamt;
M_payamtTEMP = M_payamt;
M_normamt = M_payamtTEMP;
M_payamt = M_normamtTEMP;
}
Trash = FileStrm.Read(2);
if (M_ruc == 0 && M_tempruc == 0 && M_fapruc == 0 && M_adtempruc == 0)
{ M_ruc = M_ruc; }
else
{
if (M_ruc != 0 && M_tempruc == 0 && M_fapruc == 0 && M_adtempruc == 0)
{ M_ruc = M_ruc; }
else
{
if (M_ruc != 0 && M_tempruc != 0 && M_fapruc == 0 && M_adtempruc == 0)
{ M_ruc = M_tempruc; }
else
{
if (M_ruc != 0 && M_tempruc != 0 && M_fapruc == 0 && M_adtempruc != 0)
{ M_ruc = M_adtempruc; }
else
{
if (M_ruc != 0 && M_tempruc == 0 && M_fapruc != 0 && M_adtempruc == 0)
{ M_ruc = M_fapruc; }
else
{
if (M_ruc != 0 && M_tempruc != 0 && M_fapruc != 0 && M_adtempruc == 0)
{ M_ruc = M_tempruc; }
}
}
}
}
}
if (M_DSSN != 5199 && M_DSSN != 6109 && M_DSSN != 6168 && M_DSSN != 6795 && M_DSSN != 6796 && M_DSSN != 6798 && M_DSSN != 6816 )
{
FieldData = new Array(M_ssn,M_inits,M_Lname,M_Fname,M_DSSN,M_ruc,
M_cco,M_payamt,M_normamt,M_notsureone,M_pgrp,
M_poe,M_pltcd,M_recstatus,M_paychgflg,
M_paystatuscode,Payrollnum,Payrolldate);
MyRS.AddNew(FieldNames,FieldData);
}
NumRecs++;
if (NumRecs == 10000)
{
MyDC.SubmitChanges();
NumRecs = 0;
}
}
}
}
MyDC.SubmitChanges();
FileStrm.Close();
//MyTest = DataLib.GetRS("PaydayUpdate2");
alert("Update complete");
}
//-->
</script>
</html>
Connect.asp
<%@ LANGUAGE="JSCRIPT" %>
<!--#INCLUDE FILE="../DataConnJ.asp"-->
<html>
<body>
<!-- RDS.DataControl for holding the buffered Data (I Guess) -->
<object ID="DC" CLASSID="CLSID:BD96C556-65A3-11D0-983A-00C04FC29E33" WIDTH="0" HEIGHT="0" VIEWASTEXT>
<param NAME="AllowAddNew" VALUE="TRUE">
<param NAME="AllowDelete" VALUE="TRUE">
<param NAME="AllowUpdate" VALUE="TRUE">
</object>
<!-- RDS.DataSpace for communicating with the server -->
<object ID="DP" CLASSID="CLSID:BD96C556-65A3-11D0-983A-00C04FC29E36" WIDTH="0" HEIGHT="0" VIEWASTEXT>
</object>
<input type="hidden" name="text1" value="<%=WhatServer%>">
</body>
<script src="../adojs.js"></script>
<script src="../adoconjs.js"></script>
<script src="../adomdjs.js"></script>
<script src="../adoxjs.js"></script>
<script src="../rdsjs.js"></script>
<script LANGUAGE="javascript">
<!--
var DSNString, TheDF, TheRS;
//DSNString = "DSN=TestWeb; UID=; PWD=";
DSNString = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=c:/TheData/TestDisbo.mdb";
function public_ConToDB()
{
TheDF = DP.CreateObject("RDSServer.DataFactory",this.text1.value);
DC.DataSpace=DP;
DC.Server = this.text1.value;
DC.Open = DSNString;
//DC.Connect="d:\thedata\disboweb.udl";
}
function public_GetRS()
{
var SQLCommand;
SQLCommand = "SELECT * FROM CurExtract";
TheRS = TheDF.Query(DSNString,SQLCommand);
DC.SourceRecordset=TheRS;
return (TheRS);
}
function public_GetDC()
{
return (DC);
}
//-->
</script>
</html>
DataConnJ.asp
<%
Response.Expires = 0;
var UserName = new String(Request.ServerVariables("AUTH_USER"));
var UName = UserName.substr(UserName.indexOf("\\",0)+1);
UserName = UName;
var WhatServer = Request.ServerVariables("SERVER_NAME");
if (Request.ServerVariables("SERVER_PORT_SECURE") == 1)
{ WhatServer1 = "https://" + WhatServer;}
else
{ WhatServer1 = "http://" + WhatServer; }
WhatServer = WhatServer1;
var CONNECTION = Server.CreateObject("ADODB.CONNECTION");
CONNECTION.Open("DSN=TestWeb; UID=; PWD=");
%>
I did not write this. It worked fine on the older server, but we can't get it to run. I'm not very proficient in Java and any help would be GREATLY appreciated.
Sincerly,
Joseph Russell
error: "Object doesn't support this property or method" on line58 Char 12 of LoadAnything.htm
LoadAnything.htm (shortened to the function I'm having the error on)
<html>
<head>
<title></title></head>
<body>
<link rel="stylesheet" type="text/css" href="../../StyleSheets/WizardsSmall.css">
<form action method="POST" id="form1" name="form1">
<table WIDTH="75%" ALIGN="center" BORDER="1" CELLSPACING="1" CELLPADDING="1">
<tr><td align=center>
Select File to load<br>
<INPUT type="file" id=file1 name=file1><br><input type="button" value="Load file" id="button1" name="button1" onclick="LoadFile()">
</td></tr>
</table></form></body>
<object data="../../ServerIncludes/Scriptlets/FileRead.htm" id="FileReadLib" style="HEIGHT: 0px; LEFT: 0px; TOP: 0px; WIDTH: 0px" type="text/x-scriptlet" VIEWASTEXT></object>
<object data="../../ServerIncludes/Scriptlets/FileReadDOVs.htm" id="FileReadLibDOVs" style="HEIGHT: 0px; LEFT: 0px; TOP: 0px; WIDTH: 0px" type="text/x-scriptlet" VIEWASTEXT></object>
<link href="../../ServerIncludes/adojs.js">
<script LANGUAGE="javascript">
<!--
function LoadFile() {
var AName = document.forms[0].elements[0].value;
var TName = new String(AName);
var BName = TName.toUpperCase();
FileReadLib.LoadExtract(AName); }
//-->
</script>
</html>
FileRead.htm (shortened down to the function being called)
<html>
<object data="../../ServerIncludes/Scriptlets/Connect.asp" id="DataLib" style="HEIGHT: 0px; LEFT: 0px; TOP: 0px; WIDTH: 0px" type="text/x-scriptlet" VIEWASTEXT></object>
<object data="DateLib.htm" id="DateLib" style="HEIGHT: 0px; LEFT: 0px; TOP: 0px; WIDTH: 0px" type="text/x-scriptlet" VIEWASTEXT></object>
<script LANGUAGE="javascript">
<!--
function public_LoadExtract(FName) {
var TheFile, FileStrm;
var M_ssn, M_inits, M_Lname, M_Fname, M_DSSN, M_ruc, M_paycode;
var M_normamt, M_payamt, M_pgrp, M_poe, M_pltcd, Payrollnum, Payrolldate;
var Trash
LineNum = 1;
TheFile = new ActiveXObject("Scripting.FileSystemObject");
FileStrm = TheFile.OpenTextFile(FName,1,false);
// Setup the Database Connection
var SQLCommand, TheRS, TheConnection, DSNString, Commands, MyDC;
FieldNames = new Array("ssn","inits","lname","fname","dssn","ruc","cco",
"payamt","normamt","notsureone","pgrp","poe","pltcode","recstatus",
"paychgflg","paystatuscode","payrollnum","payrolldate");
// Connect the the Database
DataLib.ConToDB();
MyDC = DataLib.GetDC();
PString = prompt("Enter Payroll Number","025");
Payrollnum = parseInt(PString,10);
DString = prompt("Enter Payroll Date","20000101");
Payrolldate = DateLib.FromMil(DString);
var NumRecs = 0;
MyRS = DataLib.GetRS("SELECT * FROM CurExtract");
PayDay = parseInt(DString.substr(6,2),10);
while (! FileStrm.atEndOfStream)
{
What = FileStrm.Read(1);
if (What != '0' && ! FileStrm.atEndOfStream)
{ FileStrm.SkipLine(); }
else
{
if ( ! FileStrm.atEndOfStream)
{
M_ssn = parseInt(FileStrm.Read(9),10);
if (isNaN(M_ssn))
{ M_ssn = 0; }
M_inits = FileStrm.Read(3);
M_Lname = FileStrm.Read(20);
M_Fname = FileStrm.Read(10);
M_DSSN = parseInt(FileStrm.Read(4),10);
if (isNaN(M_DSSN))
{ M_DSSN = 0; }
M_ruc = parseInt(FileStrm.Read(5),10);
if (isNaN(M_ruc))
{ M_ruc = 0; }
M_tempruc = parseInt(FileStrm.Read(5),10);
if (isNaN(M_tempruc))
{ M_tempruc = 0; }
M_fapruc = parseInt(FileStrm.Read(5),10);
if (isNaN(M_fapruc))
{ M_fapruc = 0; }
M_adtempruc = parseInt(FileStrm.Read(5),10);
if (isNaN(M_adtempruc))
{ M_adtempruc = 0; }
M_cco = parseInt(FileStrm.Read(1),10);
if (isNaN(M_cco))
{ M_cco = 0; }
if ( PayDay > 1 && PayDay < 16 )
{
M_normamt = parseInt(FileStrm.Read(5),10);
if (isNaN(M_normamt))
{ M_normamt = 0; }
M_payamt = parseInt(FileStrm.Read(5),10);
if (isNaN(M_payamt))
{ M_payamt = 0; }
} else {
M_payamt = parseInt(FileStrm.Read(5),10);
if (isNaN(M_payamt)) { M_payamt = 0; }
M_normamt = parseInt(FileStrm.Read(5),10);
if (isNaN(M_normamt)) { M_normamt = 0; }
}
M_notsureone = FileStrm.Read(2);
M_pgrp = parseInt(FileStrm.Read(3),10);
if (isNaN(M_pgrp))
{ M_pgrp = 0; }
M_poe = parseInt(FileStrm.Read(5),10);
if (isNaN(M_poe))
{ M_poe = 0; }
M_pltcd = FileStrm.Read(4);
M_recstatus = FileStrm.Read(1);
M_paychgflg = FileStrm.Read(1);
M_paystatuscode = parseInt(FileStrm.Read(5),10);
if (isNaN(M_paystatuscode))
{ M_paystatuscode = 0; }
if (M_paystatuscode == 2100)
{
M_normamtTEMP = M_normamt;
M_payamtTEMP = M_payamt;
M_normamt = M_payamtTEMP;
M_payamt = M_normamtTEMP;
}
Trash = FileStrm.Read(2);
if (M_ruc == 0 && M_tempruc == 0 && M_fapruc == 0 && M_adtempruc == 0)
{ M_ruc = M_ruc; }
else
{
if (M_ruc != 0 && M_tempruc == 0 && M_fapruc == 0 && M_adtempruc == 0)
{ M_ruc = M_ruc; }
else
{
if (M_ruc != 0 && M_tempruc != 0 && M_fapruc == 0 && M_adtempruc == 0)
{ M_ruc = M_tempruc; }
else
{
if (M_ruc != 0 && M_tempruc != 0 && M_fapruc == 0 && M_adtempruc != 0)
{ M_ruc = M_adtempruc; }
else
{
if (M_ruc != 0 && M_tempruc == 0 && M_fapruc != 0 && M_adtempruc == 0)
{ M_ruc = M_fapruc; }
else
{
if (M_ruc != 0 && M_tempruc != 0 && M_fapruc != 0 && M_adtempruc == 0)
{ M_ruc = M_tempruc; }
}
}
}
}
}
if (M_DSSN != 5199 && M_DSSN != 6109 && M_DSSN != 6168 && M_DSSN != 6795 && M_DSSN != 6796 && M_DSSN != 6798 && M_DSSN != 6816 )
{
FieldData = new Array(M_ssn,M_inits,M_Lname,M_Fname,M_DSSN,M_ruc,
M_cco,M_payamt,M_normamt,M_notsureone,M_pgrp,
M_poe,M_pltcd,M_recstatus,M_paychgflg,
M_paystatuscode,Payrollnum,Payrolldate);
MyRS.AddNew(FieldNames,FieldData);
}
NumRecs++;
if (NumRecs == 10000)
{
MyDC.SubmitChanges();
NumRecs = 0;
}
}
}
}
MyDC.SubmitChanges();
FileStrm.Close();
//MyTest = DataLib.GetRS("PaydayUpdate2");
alert("Update complete");
}
//-->
</script>
</html>
Connect.asp
<%@ LANGUAGE="JSCRIPT" %>
<!--#INCLUDE FILE="../DataConnJ.asp"-->
<html>
<body>
<!-- RDS.DataControl for holding the buffered Data (I Guess) -->
<object ID="DC" CLASSID="CLSID:BD96C556-65A3-11D0-983A-00C04FC29E33" WIDTH="0" HEIGHT="0" VIEWASTEXT>
<param NAME="AllowAddNew" VALUE="TRUE">
<param NAME="AllowDelete" VALUE="TRUE">
<param NAME="AllowUpdate" VALUE="TRUE">
</object>
<!-- RDS.DataSpace for communicating with the server -->
<object ID="DP" CLASSID="CLSID:BD96C556-65A3-11D0-983A-00C04FC29E36" WIDTH="0" HEIGHT="0" VIEWASTEXT>
</object>
<input type="hidden" name="text1" value="<%=WhatServer%>">
</body>
<script src="../adojs.js"></script>
<script src="../adoconjs.js"></script>
<script src="../adomdjs.js"></script>
<script src="../adoxjs.js"></script>
<script src="../rdsjs.js"></script>
<script LANGUAGE="javascript">
<!--
var DSNString, TheDF, TheRS;
//DSNString = "DSN=TestWeb; UID=; PWD=";
DSNString = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=c:/TheData/TestDisbo.mdb";
function public_ConToDB()
{
TheDF = DP.CreateObject("RDSServer.DataFactory",this.text1.value);
DC.DataSpace=DP;
DC.Server = this.text1.value;
DC.Open = DSNString;
//DC.Connect="d:\thedata\disboweb.udl";
}
function public_GetRS()
{
var SQLCommand;
SQLCommand = "SELECT * FROM CurExtract";
TheRS = TheDF.Query(DSNString,SQLCommand);
DC.SourceRecordset=TheRS;
return (TheRS);
}
function public_GetDC()
{
return (DC);
}
//-->
</script>
</html>
DataConnJ.asp
<%
Response.Expires = 0;
var UserName = new String(Request.ServerVariables("AUTH_USER"));
var UName = UserName.substr(UserName.indexOf("\\",0)+1);
UserName = UName;
var WhatServer = Request.ServerVariables("SERVER_NAME");
if (Request.ServerVariables("SERVER_PORT_SECURE") == 1)
{ WhatServer1 = "https://" + WhatServer;}
else
{ WhatServer1 = "http://" + WhatServer; }
WhatServer = WhatServer1;
var CONNECTION = Server.CreateObject("ADODB.CONNECTION");
CONNECTION.Open("DSN=TestWeb; UID=; PWD=");
%>
I did not write this. It worked fine on the older server, but we can't get it to run. I'm not very proficient in Java and any help would be GREATLY appreciated.
Sincerly,
Joseph Russell