ERROR Microsoft OLE DB Provider for ODBC Drivers (0x80040E57)

0
August 16, 2011

Hi,

 I am using a oracle RDB casue i change from a sql database but i cant get the date to be right for the page to display. I get this error below.

Error Type:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E57)

[Oracle][ODBC][Rdb]%RDB-E-

ARITH_EXCE

PT, truncation of a numeric value at runtime -SQL-F-DATCONERR, Data conversion error for string '1012-00-50' -COSI-F-IVTIME, invalid date or time

The date coming from the RDB is yyyy-mm-dd and i cant get it to read it that way. Can you please help me.

Here is the code where im trying to get the date from a drop down header cookie.

Dim reportDate

If Request.Cookies("SEL_DATE"

) <> "" And IsDate(Request.Cookies("SE

L_DATE")) Then

reportDate = Request.Cookies("SEL_DATE"

)

Else

reportDate = Date

End If

If cDate(reportDate) >= Date Then Response.Write("Warning: You have chosen to generate a report for a day which still has turns remaining.<br>The information in the report may not yet be finalized.")

Dim ParamList(2)

Dim InfoHandle

'We want the information for the whole month until the report date so our first parameter should be the first of the month.

'We do not need to prepend a "#" because the cold mill is currently in an SQL database. When it switches to the RDB this must be modified.

ParamList(1) = reportDate

ParamList(0) = Month(reportDate) & " /1/ " & Year(reportDate)

InfoHandle = RunQuery("ColdMillProducti

on", "C:\Inetpub\wwwroot\pickle

r\SQL\cmpr

oTurnInfoQ

uery.SQL",

ParamList)

Here is my SEL_DATE cookie:

Dim SelectedDate

Dim DisplayDate

If Request.Cookies("SEL_DATE"

) <> "" And IsDate(Request.Cookies("SE

L_DATE")) Then

SelectedDate = Request.Cookies("SEL_DATE"

)

DisplayDate = Month(SelectedDate) & "/" & Day(SelectedDate) & "/" & Year(SelectedDate)

Else

SelectedDate = Now

DisplayDate = "Current"

End If

Comments See all(0)

Add comment
0
August 16, 2011

sure thing, glad to have been able to help.

0
August 16, 2011

Why don't you response.write out the various date values before executing your SQL statement? That way, you'd be able to see exactly what's being passed to the query.

For example, I would do this first:

response.write cDate(reportDate) & "<br>"

response.write Date

response.end

Then I would try this:

ParamList(1) = reportDate

ParamList(0) = Month(reportDate) & " /1/ " & Year(reportDate)

response.write reportDate & "<br>"

response.write Month(reportDate) & " /1/ " & Year(reportDate)

response.end

0
August 16, 2011

When i tried the first example you told me to do i got:

12:00 AM

11/16/2005

Then i tried the second example and got :

11/07/2005-------this is the date in the pull down menu that you can select

11/1/2005---------this is because i want it to start to read at the beginning of the month.

I thought that was how it was supposed to work. What is my error?

Thanks

0
August 16, 2011

For the 1st example, check this: Request.Cookies("SEL_DATE"

)

response.write Request.Cookies("SEL_DATE"

)

response.end

Because if you are getting this:

12:00 AM

11/16/2005

Then I think you have a problem with the "reportDate" value, which is coming from your cookie value...

0
August 16, 2011

I got 11/12/2005 which is the date of the drop down menu. It seems that when you add the cDate function with (reportDate) it turned into time. Is that supposed to happen?

0
August 16, 2011

No, that's why I think the value being passed to the CDate function is not a valid date. See this from the vbscript language reference (note the following -- "Any fractional part of the number is converted to a time of day, starting at midnight" --):

Description

Returns an expression that has been converted to a Variant of subtype Date.

Syntax

CDate(date)

The date argument is any valid date expression.

Remarks

Use the IsDate function to determine if date can be converted to a date or time. CDate recognizes date literals and time literals as well as some numbers that fall within the range of acceptable dates. When converting a number to a date, the whole number portion is converted to a date. Any fractional part of the number is converted to a time of day, starting at midnight.

CDate recognizes date formats according to the locale setting of your system. The correct order of day, month, and year may not be determined if it is provided in a format other than one of the recognized date settings. In addition, a long date format is not recognized if it also contains the day-of-the-week string.

The following example uses the CDate function to convert a string to a date. In general, hard coding dates and times as strings (as shown in this example) is not recommended. Use date and time literals (such as #10/19/1962#, #4:45:23 PM#) instead.

0
August 16, 2011

See im kinda new to this...so im sorry if i dont understand what ur saying.

Everywhere i use reportdate and cdate i should just use the date #10/19/1962# or do you mean everywhere theres a string just give date literal?

Im not trying to include time, i just need the date.

0
August 16, 2011

OK, you need a date, not the time, right? The time you are getting is a result of the CDate() function not receiving a complete valid date expression. In other words, in your code, this statement:

cDate(reportDate)

is returning the time value of "12:00 AM" because the "reportDate" variable does not contain a complete date value. Doublecheck the process that populates the "reportDate" variable. It needs to put a complete valid date expression into the variable...

Check to see what's in the varible like this:

response.write reportDate

response.end

0
August 16, 2011

Ok when i did that i got the date that was in the drop down menu

11/14/2005

0
August 16, 2011

Then if you do this:

response.write reportDate & "<br>"

response.write CDate(reportDate)

response.end

What do you get?

0
August 16, 2011

i get

11/14/2005

11/14/2005

0
August 16, 2011

Ok, in my first example above:

response.write cDate(reportDate) & "<br>"

response.write Date

response.end

You got the following:

12:00 AM

11/16/2005

So something has changed. But that's ok, now you know that the reportDate variable has a valid date value in it. So now you can move on and check the second example...

If you comment out all of the response.write and response.end stuff you've been debugging with, does your page still return an error when it executes?

0
August 16, 2011

this is becasue i tried it after the

If Request.Cookies("SEL_DATE"

) <> "" And IsDate(Request.Cookies("SE

L_DATE")) Then

            reportDate = Request.Cookies("SEL_DATE"

)

      Else

            reportDate = Date

      End If

but if you try it before that you get

12:00 am

11/14/2005

0
August 16, 2011

the second results were right. my fault. it was doing that becasue reportdate had not been declared yet.

0
August 16, 2011

response.write reportDate & "<br>"

response.end

i get 11/14/2005

response.write reportDate & "<br>"

response.write cdate(reportDate)

response.end

i get 11/14/2005

        11/14/2005

all after the end if

0
August 16, 2011

Ok, so we've determined that the cookie has the valid date going into your variable...

And these are the values being sent to your query:

11/07/2005-------this is the date in the pull down menu that you can select

11/1/2005---------this is because i want it to start to read at the beginning of the month.

But this is the error coming back from Oracle:

"Data conversion error for string '1012-00-50' "

That looks like one of the parameters being passed to the query has an invalid date... Can you execute the query directly against the DB, similar to running it in SQL Server's Query Analyzer?

0
August 16, 2011

this is the error it returns with

Error Type:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E57)

[Oracle][ODBC][Rdb]%RDB-E-

ARITH_EXCE

PT, truncation of a numeric value at runtime -SQL-F-DATCONERR, Data conversion error for string '1112-00-50' -COSI-F-IVTIME, invalid date or time

/PICKLER/common/connect.as

p, line 202

the line that it points too is the page that connects to my database.

here is the code it points to.

Dim i

                  Dim TempName

                  Dim TempType

                  Dim TempParam

                  'For each parameter we were passed, add it as a parameter object to the command object

                  For i = 0 To UBound(ParamList) - 1

                              If Left(ParamList(i), 1) = "#" Then

                                    TempType = adDBTimeStamp

                                    TempParam = Mid(ParamList(i), 2)

                              Else

                                    TempType = adVarChar

                                    TempParam = ParamList(i)

                              End If

                              TempName = "Param" & i

                              Cmd.Parameters.Append Cmd.CreateParameter(TempNa

me, TempType, adParamInput, 50, TempParam)

                              QueryString = QueryString & ", " & TempParam

                  Next

line 202                  *******RecSet(UBound(RecSe

t)).Open Cmd

0
August 16, 2011

Ok, take a look at that query:

response.write QueryString

response.end

0
August 16, 2011

I would put that right before line 202

0
August 16, 2011

well i changed it to

ParamList(1) = reportDate

ParamList(0) = "#" & Month(reportDate) & "/1/" & Year(reportDate)

and it gave me the right date but not in the right format  1114-20-05 and i had the pull down menu set to 11/14/2005.

Error Type:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E57)

[Oracle][ODBC][Rdb]%RDB-E-

ARITH_EXCE

PT, truncation of a numeric value at runtime -SQL-F-DATCONERR, Data conversion error for string '1114-20-05' -COSI-F-IVTIME, invalid date or time

/PICKLER/common/connect.as

p, line 202

when i test the query using  oracle ODBC 32 BIT TEST THE DATE COMES OUT 2005-11-14.

WHEN I DO IT IN ACCESS IT GIVES ME THE SAME ERROR AS ABOVE BUT WHEN I PUT IN AN EXACT DATE WITH #'S AROUND IT, THEY WORK.

HERE IS THE QUERY TOO AND THE DATE IS CALLED PRODUCTION DATE.

SELECT

CM3_PRO_TURNS.PRODUCTION_D

ATE,  

CM3_PRO_TURNS.TURN,  

CM3_PRO_TURNS.TURN_LENGTH_

HOURS,  

CM3_PRO_TURNS.ACTUAL_ROLL_

TIME,  

CM3_PRO_TURNS.ACTUAL_DELAY

_TIME,  

CM3_PRO_TURNS.NUM_COILS_ON

,  

CM3_PRO_TURNS.NUM_COILS_OF

F,  

CM3_PRO_TURNS.TURN_POUNDS,

CM3_PRO_TURNS.TURN_FOOTAGE

,  

CM3_PRO_TURNS.SCRAP_POUNDS

,  

CM3_PRO_TURNS.SHIFT_MANAGE

R_ID,  

CM3_PRO_TURNS.ROLLER_ID,  

CM3_PRO_TURNS.RECORDER_ID,

CM3_PRO_TURNS.CREW

FROM CM3_PRO_TURNS  

WHERE CM3_PRO_TURNS.PRODUCTION_D

ATE BETWEEN ? AND ?

0
August 16, 2011

THIS IS THE QUERY IT SPITS OUT

SELECT CM3_PRO_TURNS.PRODUCTION_D

ATE, CM3_PRO_TURNS.TURN, CM3_PRO_TURNS.TURN_LENGTH_

HOURS, CM3_PRO_TURNS.ACTUAL_ROLL_

TIME, CM3_PRO_TURNS.ACTUAL_DELAY

_TIME, CM3_PRO_TURNS.NUM_COILS_ON

, CM3_PRO_TURNS.NUM_COILS_OF

F, CM3_PRO_TURNS.TURN_POUNDS,

CM3_PRO_TURNS.TURN_FOOTAGE

, CM3_PRO_TURNS.SCRAP_POUNDS

, CM3_PRO_TURNS.SHIFT_MANAGE

R_ID, CM3_PRO_TURNS.ROLLER_ID, CM3_PRO_TURNS.RECORDER_ID,

CM3_PRO_TURNS.CREW FROM CM3_PRO_TURNS WHERE CM3_PRO_TURNS.PRODUCTION_D

ATE BETWEEN ? AND ?, 11/1/2005, 11/14/2005

0
August 16, 2011

FOR SOME REASON THIS IS THE ONLY PAGE THAT DOESNT WANT TO WORK AND THE OTHERS ARE MORE COMPLICATED CAUSE THEY HANDLE DAY, YEAR, AND MONTH BUT FOR SOME STRANGE REASON IT WORKS.

0
August 16, 2011

>>ParamList(1) = reportDate

>>ParamList(0) = "#" & Month(reportDate) & "/1/" & Year(reportDate)

>>and it gave me the right date but not in the right format  1114-20-05 and i had the pull down menu set to 11/14/2005.

What gave you the right date? Do you mean the right date was in the 1st or 2nd parameters? Can you post the code for the pull down menu?

0
August 16, 2011

HERE IS THE CODE FROM THE PULL DOWN MENU WE CALL IT THE POPLIST BOX.. NOT THE RIGHT DATE TO MAKE IT WORK BUT THE RIGHT DATE BUT IN A SCRAMBLED FORMAT1114-20-05. THE POPLIST BOX USES A HEADER TO LET THE PERSON SELECT A DATE AND THEN DISPLAY THE INFO. THIS WAS DONE BY SOMEONE BEFORE ME. HERE IS THE HEADER CODE TOO. BUT I PUT IT IN THE NEXT FORM. IM ABOUT TO LEAVE UNTIL TOMORROW. WILL U BE BACK? I LL BE HERE AT 7 AM EST.

<%

'**********

'Page name: PopListBox.asp

'Date Last Modified: 2/14/2005 DRK

'Purpose: included file containing the function PopListBox

'Included by: header.asp

'                        header_day.asp

'                        header_month.asp

'                        header_year.asp

'**********

%>

<%      

      '**********

      'Purpose: Generates the HTML to make a set of three listboxes to allow the user to easily

      'select dates

      'Inputs:       givemedate - date that the listbox should initially be set to

      '                  prename - a string which will be used to uniquely identify each set of listboxes

      'Returns: HTML code for creating the listboxes

      '**********

      Function PopListBox(givemedate,pren

ame)

            Dim k

            Dim Stringit

            Stringit =  "<p align=""center""> <select size=""1"" name=""" & prename & "day"">"

            For k = 1 to 31

                  If day(givemedate) = k Then

                        If k > 9 Then

                              Stringit = Stringit & "<OPTION Value=""" & k & """ selected>" & k & "</OPTION>"

                        Else

                              Stringit = Stringit & "<OPTION Value=""0" & k & """selected>0" & k & "</OPTION>"

                        End If                  

                  Else

                        If k > 9 Then

                              Stringit = Stringit & "<OPTION Value=""" & k & """>" & k & "</OPTION>"

                        Else

                              Stringit = Stringit & "<OPTION Value=""0" & k & """>0" & k & "</OPTION>"

                        End If                  

                  End If

            Next

            Stringit = Stringit & "</select><select size=""1"" name=""" & prename & "month"">"

            For k = 1 to 12

                  If month(givemedate) = k Then

                        Stringit = Stringit & "<option value=""" & k & """ selected>" & monthname(k) & "</option>"

                  Else

                        Stringit = Stringit & "<option value=""" & k & """>" & monthname(k) & "</option>"

                  End If

            Next

            Stringit = Stringit & "</select><select size=""1"" name=""" & prename & "year"">"

            If(abs(year(now) - year(givemedate)) <= 2) Then

            For k = year(now) to (year(now) - 2) step -1

                  If year(givemedate) = k Then

                        Stringit = Stringit & "<option value=""" & k & """ selected>" & k & "</option>"

                  Else

                        Stringit = Stringit & "<option value=""" & k & """>" & k & "</option>"

                  End If

            Next

            Else

            For k = year(givemedate)-5 to year(givemedate)+5

                  If year(givemedate) = k Then

                        Stringit = Stringit & "<option value=""" & k & """ selected>" & k & "</option>"

                  Else

                        Stringit = Stringit & "<option value=""" & k & """>" & k & "</option>"

                  End If

            Next

            End If

            Stringit = Stringit & "</select>"

            PopListBox = Stringit

      End Function

      '**********

      'Purpose: Generates the HTML to make a two listboxes to allow the user to easily

      'select month and year

      'Inputs:       givemedate - date that the listbox should initially be set to

      '                  prename - a string which will be used to uniquely identify each set of listboxes

      'Returns: HTML code for creating the listboxes

      '**********

      Function PopListBoxMonth(givemedate

,prename)

            Dim k

            Dim Stringit

            Stringit = Stringit & "<select size=""1"" name=""" & prename & "month"">"

            For k = 1 to 12

                  If month(givemedate) = k Then

                        Stringit = Stringit & "<option value=""" & monthname(k, 3) & """ selected>" & monthname(k) & "</option>"

                  Else

                        Stringit = Stringit & "<option value=""" & monthname(k, 3) & """>" & monthname(k) & "</option>"

                  End If

            Next

            Stringit = Stringit & "</select><select size=""1"" name=""" & prename & "year"">"

            For k = year(givemedate) to year(givemedate) - 2 step -1

                  If year(givemedate) = k Then

                        Stringit = Stringit & "<option value=""" & k & """ selected>" & k & "</option>"

                  Else

                        Stringit = Stringit & "<option value=""" & k & """>" & k & "</option>"

                  End If

            Next

            Stringit = Stringit & "</select>"

            PopListBoxMonth = Stringit

      End Function

'**********

'Purpose: Generates the HTML to make a listbox to allow the user to easily

'select a year

'Inputs:       givemedate - date that the listbox should initially be set to

'                  prename - a string which will be used to uniquely identify each set of listboxes

'Returns: HTML code for creating the listboxes

'**********

Function PopListBoxYear(givemedate,

prename)

            Dim k

            Dim Stringit

            Stringit = Stringit & "<select size=""1"" name=""" & prename & "year"">"

            For k = year(now) to year(now) - 2 step -1

                  If year(givemedate) = k Then

                        Stringit = Stringit & "<option value=""" & k & """ selected>" & k & "</option>"

                  Else

                        Stringit = Stringit & "<option value=""" & k & """>" & k & "</option>"

                  End If

            Next

            Stringit = Stringit & "</select>"

            PopListBoxYear = Stringit

      End Function

0
August 16, 2011

<!--#include file="../common/PopListBox

.asp"-->

<%

'**********

'Page name: header_day.asp

'Date Last Modified: 2/14/2005 DRK

'Purpose: This page allows a user to select a date to generate reports on, set the date to whatever the current is.  Stores the date in SEL_DATE

'                  and also stores the first day of the month of the selected date in SEL_MONTH and the first day of the year of the selected date in SEL_YEAR

'Parent frame: index.asp

'Directly Includes: PopListBox.asp

'Links to: index.asp,

www.akst.com/newhome.htm

'User Input:  listboxes for day, month and year and a button to set them, a button to reset everything to the current day

'**********

%>

<%

Dim SelectedDate

Dim DisplayDate

      If Request.Cookies("SEL_DATE"

) <> "" And IsDate(Request.Cookies("SE

L_DATE")) Then

            SelectedDate = Request.Cookies("SEL_DATE"

)

            DisplayDate = Month(SelectedDate) & "/" & Day(SelectedDate) & "/" & Year(SelectedDate)

      Else

            SelectedDate = Now

            DisplayDate = "Current"

      End If

%>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<meta name="GENERATOR" content="Microsoft FrontPage 4.0">

<meta name="ProgId" content="FrontPage.Editor.

Document">

<title>New Page 1</title>

<base target="_self">

</head>

<body bgcolor="#000000">

<table width="800"><tr>

<td valign="top" width="154"><a href="

http://www.akst.com/ newhome.ht m

" target="_top"><img border="0" src="../images/AKSteel.png

" width="154" height="30"></a></td>

<td valign="top" width="120"><a href="../index.asp" target="_top"><img border="0" src="../images/home.jpg" width="120" height="32"></a><br></td>

<td valign="top" width="263" align="center">

<form onSubmit="setSelDate()" name=SelDate>

<table cellspacing="5">

<tr><td colspan="2"><%=PopListBox(

SelectedDa

te, "sel")%>

</td></tr>

<tr>

<td align="center">

<input type="button" value="Use Calendar" onClick="showCalendar(SelD

ate.selday

,SelDate.s

elmonth,Se

lDate.sely

ear,'dd/mm

/yyyy','Ch

oose date')">

</td><td align="center">

<input type="submit" value="Set">

</td></tr>

</table>

</form></td>

<td valign="top" width="263" align="center">

<table cellspacing="5"><tr><td>

<font color="#C0C0C0">Selected Date: <%=DisplayDate%></font>

</td></tr>

<tr><td align="center"><form onSubmit="resetSelDate()" name=ResetSelDate><input type=submit value="Now"></form></td></

tr>

</table>

</td></tr></table>

</body>

</html>

<script LANGUAGE="JavaScript" SRC="../common/calendar.js

"></script

>

<script language="JavaScript">

function createCookie(name,value,da

ys){

      if (days != 0)      {

            var date = new Date()

            date.setTime(date.getTime(

) + (days2460601000))

            var expires = "; expires=" + date.toGMTString()      

            }

      else var expires = ""

      document.cookie = name + "=" + value + expires + "; path=/"

}

function eraseCookie(name){

      createCookie(name,"",-1)

}

      function setSelDate(){

            var seldate

            seldate = document.SelDate.selmonth.

value + "/" + document.SelDate.selday.va

lue + "/" + document.SelDate.selyear.v

alue

            createCookie("SEL_DATE", seldate, 1)

            seldate = document.SelDate.selmonth.

value + "/1/" + document.SelDate.selyear.v

alue

            createCookie("SEL_MONTH", seldate, 1)

            seldate = "1/1/" + document.SelDate.selyear.v

alue

            createCookie("SEL_YEAR", seldate, 1)

            createCookie("TURN", 1, 1)

            window.parent.frames("main

").locatio

n.reload()

      }

      function resetSelDate()      {

            eraseCookie("SEL_DATE")

            eraseCookie("SEL_MONTH")

            eraseCookie("SEL_YEAR")

            eraseCookie("TURN")

            window.parent.frames("main

").locatio

n.reload()

      }

</script>

0
August 16, 2011

Ok, the code above seems to work ok when I test it. That is, the pulldowns generate the correct values, and the cookie is populated with a valid date expression.

The query seems to have the correct values.

Where is the scrambled date showing up?

As far as I know, Oracle may not need the date delimiters (#) like Access does...

0
August 16, 2011

When  try to load it with in IE and put in the date the data that i have displaying there doesnt show. It give me that error.

Error Type:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E57)

[Oracle][ODBC][Rdb]%RDB-E-

ARITH_EXCE

PT, truncation of a numeric value at runtime -SQL-F-DATCONERR, Data conversion error for string '1114-20-05' -COSI-F-IVTIME, invalid date or time

/PICKLER/common/connect.as

p, line 202

Here is the whole page. Maybe that will shed some light on it. Maybe im doing something that isnt allowed. The thing is that all this worked when i was using the sql database but i had to switch over to the Oracle RDB.

<%@ LANGUAGE="VBScript" %>

<% Option Explicit %>

<%Response.Buffer = True %>

<%

'**********

'Page name: daily_summary_cm.asp and daily_summary_cm_code.asp

'Date Last Modified: 2/14/2005

'Purpose: This page displays production statistics for the cold mill and both pickler lines for each turn in the report day, the day total, the

'      month through previous day, and the month up to and including the report date

'Parent frame: index.asp

'Directly Includes: connect.asp

'Required Page Input: none

'Optional Page Input: cookie SEL_DATE:  holds the value of the desired report date.  If empty, the page defaults to the current day

'**********

%>

<!--#include file="../common/connect.as

p"-->

<%

Dim ProductionStartTime

Dim ProductionEndTime

Dim DayStartTime

'**********

'Purpose: Takes a cDate type object and returns just the time without the date

'Inputs: myDate - the cDate object whose time will be extracted

'Returns: the time in HH:MM AMPM format  

'**********

Public Function dateToTime(myDate)

      Dim myHour

      Dim myMin

      Dim myAMORPM

      myHour = DatePart("h", myDate)

      myMin = DatePart("n", myDate)

      myAMORPM = "AM"

      If myHour > 12 Then

            myHour = myHour - 12

            myAMORPM = "PM"

      End If

      If myHour = 12 Then

            myAMORPM = "PM"

      End If

      If myHour = 0 Then

            myHour = 12

      End If

      If myMin < 10 Then

            myMin = "0" & myMin

      End If

      dateToTime = myHour & ":" & myMin & " " & myAMORPM            

End Function

'**********

'Purpose: Determines the actual start and end times for a given production date

'Inputs: Line - the line you want the times for

'                  ProductionStartDate - the date of the first day in the period you want the actual production times for

'                  productionEndDate - the date of the last day in the period you want the actal production times for.

'Returns: None

'**********

Public Function getProductionTimes(Line, productionStartDate, productionEndDate)

      Dim TurnTimeHandle

      Dim TempDate

      Dim ParamList(3)

      ParamList(0) = "#" & productionStartDate

      ParamList(1) = "#" & productionEndDate

      ParamList(2) = Line

      TurnTimeHandle = RunQuery("PicklerProductio

n", "C:\Inetpub\wwwroot\pickle

r\SQL\pklr

ptTurnTime

Query.sql"

, ParamList)

      If RecSet(TurnTimeHandle).EOF

And RecSet(TurnTimeHandle).BOF

Then

            ProductionStartTime = productionStartDate & " 12:00:00 AM"

            ProductionEndTime = productionEndDate & " 11:59:59 PM"

            DayStartTime = productionEndDate & " 12:00:00 AM"

      Else

            While Not RecSet(TurnTimeHandle).EOF

                  If RecSet(TurnTimeHandle)("TU

RN") = 1 And ProductionStartTime = "" And cDate(RecSet(TurnTimeHandl

e)("STARTI

NG_PRODUCT

ION_DATE_T

IME")) > cDate(RecSet(TurnTimeHandl

e)("ENDING

_PRODUCTIO

N_DATE_TIM

E")) Then

                        TempDate = cDate(RecSet(TurnTimeHandl

e)("STARTI

NG_PRODUCT

ION_DATE_T

IME"))

                        ProductionStartTime = cDate(DateAdd("n", -1, DateAdd("d", -1, cDate(Month(TempDate) & "/" & Day(TempDate) & "/" & Year(TempDate) & " " & dateToTime(TempDate)))))

                  Else

                        If ProductionStartTime = "" Then

                              TempDate = cDate(RecSet(TurnTimeHandl

e)("STARTI

NG_PRODUCT

ION_DATE_T

IME"))

                              ProductionStartTime = DateAdd("n", -1, cDate(Month(TempDate) & "/" & Day(TempDate) & "/" & Year(TempDate) & " " & dateToTime(TempDate)))

                        End If

                  End If      

                  If RecSet(TurnTimeHandle)("TU

RN") = 1 And cDate(RecSet(TurnTimeHandl

e)("PRODUC

TION_DATE"

)) = cDate(productionEndDate) And DayStartTime = "" And cDate(RecSet(TurnTimeHandl

e)("STARTI

NG_PRODUCT

ION_DATE_T

IME")) > cDate(RecSet(TurnTimeHandl

e)("ENDING

_PRODUCTIO

N_DATE_TIM

E")) Then

                        TempDate = cDate(RecSet(TurnTimeHandl

e)("STARTI

NG_PRODUCT

ION_DATE_T

IME"))

                        DayStartTime = cDate(DateAdd("n", -1, DateAdd("d", -1, cDate(Month(TempDate) & "/" & Day(TempDate) & "/" & Year(TempDate) & " " & dateToTime(TempDate)))))

                  Else

                        If DayStartTime = "" And cDate(RecSet(TurnTimeHandl

e)("PRODUC

TION_DATE"

)) = cDate(productionEndDate) Then

                              TempDate = cDate(RecSet(TurnTimeHandl

e)("STARTI

NG_PRODUCT

ION_DATE_T

IME"))

                              DayStartTime = DateAdd("n", -1, cDate(Month(TempDate) & "/" & Day(TempDate) & "/" & Year(TempDate) & " " & dateToTime(TempDate)))

                        End If

                  End If      

                  TempDate = cDate(RecSet(TurnTimeHandl

e)("ENDING

_PRODUCTIO

N_DATE_TIM

E"))

                  If TempDate < ProductionStartTime Then

                        TempDate = Now

                  End If

                  ProductionEndTime =       DateAdd("n", 1, cDate(Month(TempDate) & "/" & Day(TempDate) & "/" & Year(TempDate) & " " & dateToTime(TempDate)))

                  RecSet(TurnTimeHandle).Mov

eNext

            Wend

            'Response.Write("<script language=""javascript"">wi

ndow.alert

(" & ProductionStartTime & " " & ProductionEndTime & ")</script>")

            'Response.Flush            

      End If

      CloseRS(TurnTimeHandle)

End Function

      '**********

      'Purpose: takes the doubly subscripted array storing all the pickler data and generates the code for one row of an html table, displaying one

      '      of the array's row's data in that row.

      'Inputs: array: the doubly subscripted array holding all the pickler data.  rows represent line 4 and 5, columsn represent different periods.

      '                  row: the number of the row you want to generate the html row for, 0 for 4 line, 1 for 5 line

      '                  name: the name of the data type to be displayed in the html row

      'Returns: one row in an html table dispalying the name of the data type and all data of that type for one line.

      '**********

      Function genRowP(array, row, name)

            Dim tempStr

            tempStr = "<tr><td>" & name & "</td>"

            Dim i

            For i = 0 to 5

                  tempStr = tempStr & "<td>" & FormatNumber(array(row, i), 1)

                  If Right(name, 1) = "%" Then tempStr = tempStr & "%"

                  tempStr = tempStr & "</td>"

            Next

            tempStr = tempStr & "</tr>"

            genRowP = tempStr

      End Function

'**********

'Ppurpose: takes a single subscripted array storing cold mill information and generates the code for one row of an html table

'Inputs: array: the array holding the cold mill data

'                  name: the name of the data type to be displayed

'Returns: one row of an html table displaying the name of the data type and all data of that type

'**********

      Function genRow(array, name)

            Dim tempStr

            tempStr = "<tr><td>" & name & "</td>"

            Dim i

            For i = 0 to 5

                  tempStr = tempStr & "<td>" & FormatNumber(array(i), 1)

                  If Right(name, 1) = "%" Then tempStr = tempStr & "%"

                  tempStr = tempStr & "</td>"

            Next

            tempStr = tempStr & "</tr>"

            genRow = tempStr

      End Function

      'Each statistic will have 6 elements in an array.  0 is used for the month through the report day, 1, 2, and 3 are used for the 11-7, 7-3, and 3-11\

      'turns, 4 is used for the sum for the whole day, and 5 is used for month to date including the report date.

      Dim Hours(6)

      Dim DelayMinutes(6)

      Dim CoilsIn(6)

      Dim CoilsOut(6)

      Dim Tons(6)

      Dim LinearFeet(6)

      Dim AvgWidth(6)

      Dim Turns(6)

      Dim TonsPerHour(6)

      Dim FeetPerRollHourEff(6)

      Dim TonsPerCoil(6)

      Dim FeetPerCoil(6)

      Dim PoundsPerFoot(6)

      Dim AverageGauge(6)

      Dim CSA(6)

      Dim Availability(6)

      Dim reportDate

      'response.write reportDate & "<br>"

   'response.end

      'response.write cDate(reportDate) & "<br>"

      'response.write Date

      'response.end

      If Request.Cookies("SEL_DATE"

) <> "" And IsDate(Request.Cookies("SE

L_DATE")) Then

            reportDate = Request.Cookies("SEL_DATE"

)

      Else

            reportDate = Date

      End If

      'response.write cdate(reportDate)

      'response.write reportDate & "<br>"

      'response.end

      'response.write reportDate & "<br>"

   'response.end

      If cdate(reportDate) >= Date Then Response.Write("Warning:  You have chosen to generate a report for a day which still has turns remaining.<br>The information in the report may not yet be finalized.")

      Dim ParamList(2)

      Dim InfoHandle

      'We want the information for the whole month until the report date so our first parameter should be the first of the month.

      'We do not need to prepend a "#" because the cold mill is currently in an SQL database.  When it switches to the RDB this must be modified.

      ParamList(1) = reportDate

      ParamList(0) = "#" & Month(reportDate) & "/1/" & Year(reportDate)

      'response.write(reportDate

) & "<BR>"

      'response.write Month(reportDate) & "/1/" & Year(reportDate)

      'response.end

      'ParamList(0) = Month(reportDate) & " /1/ " & Year(reportDate)

      'ParamList(1) = reportDate

      InfoHandle = RunQuery("ColdMillProducti

on", "C:\Inetpub\wwwroot\pickle

r\SQL\cmpr

oTurnInfoQ

uery.SQL",

ParamList)

      Dim Turn

      While Not RecSet(InfoHandle).EOF

            'If the crew number is 0, the cm was on a down turn.

            If RecSet(InfoHandle)("CREW")

<> 0 Then

                  'If the date of the turn in the recset is the date of the report, store the appropriate data in column 1-3 (depending on turn) and 4 for the whole day

                  If cDate(RecSet(InfoHandle)("

PRODUCTION

_DATE")) = cDate(reportDate) Then

                        Turn = RecSet(InfoHandle)("TURN")

                        Hours(Turn) = RecSet(InfoHandle)("TURN_L

ENGTH_HOUR

S")

                        Hours(4) = Hours(4) + RecSet(InfoHandle)("TURN_L

ENGTH_HOUR

S")

                        DelayMinutes(Turn) = RecSet(InfoHandle)("ACTUAL

_DELAY_TIM

E")

                        DelayMinutes(4) = DelayMinutes(4) + RecSet(InfoHandle)("ACTUAL

_DELAY_TIM

E")

                        CoilsIn(Turn) = RecSet(InfoHandle)("NUM_CO

ILS_ON")

                        CoilsIn(4) = CoilsIn(4) + RecSet(InfoHandle)("NUM_CO

ILS_ON")

                        CoilsOut(Turn) = RecSet(InfoHandle)("NUM_CO

ILS_OFF")

                        CoilsOut(4) = CoilsOut(4) + RecSet(InfoHandle)("NUM_CO

ILS_OFF")

                        Tons(Turn) = RecSet(InfoHandle)("TURN_P

OUNDS") / 2000

                        Tons(4) = Tons(4) + RecSet(InfoHandle)("TURN_P

OUNDS") / 2000

                        LinearFeet(Turn) = RecSet(InfoHandle)("TURN_F

OOTAGE") / 1000

                        LinearFeet(4) = LinearFeet(4) + RecSet(InfoHandle)("TURN_F

OOTAGE") / 1000

                        Turns(Turn) = 1

                        Turns(4) = Turns(4) + 1

                  Else

                        'If the date of the turn in the recset is not the report date, store the data only in column 0 for month through previous day

                        Hours(0) = Hours(0) + RecSet(InfoHandle)("TURN_L

ENGTH_HOUR

S")

                        DelayMinutes(0) = DelayMinutes(0) + RecSet(InfoHandle)("ACTUAL

_DELAY_TIM

E")

                        CoilsIn(0) = CoilsIn(0) + RecSet(InfoHandle)("NUM_CO

ILS_ON")

                        CoilsOut(0) = CoilsOut(0) + RecSet(InfoHandle)("NUM_CO

ILS_OFF")

                        Tons(0) = Tons(0) + RecSet(InfoHandle)("TURN_P

OUNDS") / 2000

                        LinearFeet(0) = LinearFeet(0) + RecSet(InfoHandle)("TURN_F

OOTAGE") / 1000

                        Turns(0) = Turns(0) + 1

                  End If

                  'Always store the data in column 5 for month to date.

                  Hours(5) = Hours(5) + RecSet(InfoHandle)("TURN_L

ENGTH_HOUR

S")

                  DelayMinutes(5) = DelayMinutes(5) + RecSet(InfoHandle)("ACTUAL

_DELAY_TIM

E")

                  CoilsIn(5) = CoilsIn(5) + RecSet(InfoHandle)("NUM_CO

ILS_ON")

                  CoilsOut(5) = CoilsOut(5) + RecSet(InfoHandle)("NUM_CO

ILS_OFF")

                  Tons(5) = Tons(5) + RecSet(InfoHandle)("TURN_P

OUNDS") / 2000

                  LinearFeet(5) = LinearFeet(5) + RecSet(InfoHandle)("TURN_F

OOTAGE") / 1000

                  Turns(5) = Turns(5) + 1

            End If

            RecSet(InfoHandle).MoveNex

t

      Wend

      'Calculate all the formula dependant information for each column

      Dim ActFtPerRHR

      Dim PlanFtPerRHR

      For Turn = 0 to 5

            If CoilsIn(Turn) <> 0 Then

                  FeetPerCoil(Turn) = LinearFeet(Turn) * 1000 / CoilsIn(Turn)

                  TonsPerCoil(Turn) = Tons(Turn) / CoilsIn(Turn)

            End If

            If Hours(Turn) <> 0 Then

                  TonsPerHour(Turn) = Tons(Turn) / Hours(Turn)

                  Availability(Turn) = (Hours(Turn) - DelayMinutes(Turn)/60) / Hours(Turn) * 100

                  ActFtPerRHR = (LinearFeet(Turn) * 1000 /(Hours(Turn) - (DelayMinutes(Turn) + ((CoilsOut(Turn)-CoilsIn(T

urn))*.75)

)/60))

                  If FeetPerCoil(Turn) > 12000 Then

                        PlanFtPerRHR = 5 * FeetPerCoil(Turn) + 129500

                  Else

                        PlanFtPerRHR = 12 * FeetPerCoil(Turn) + 46000

                  End If

                  FeetPerRollHourEff(Turn) = ActFtPerRHR / PlanFtPerRHR * 100

            End If

            If LinearFeet(Turn) <> 0 Then

                  PoundsPerFoot(Turn) = Tons(Turn) * 2000 / (LinearFeet(Turn) * 1000)

                  CSA(Turn) = PoundsPerFoot(Turn) / 12 / .273

            End If

      Next

      CloseRS(InfoHandle)

      Dim tableHead

      tableHead = "<table border=1 width=640 cellspacing=0 bordercolorlight=""#000000

"" bordercolordark=""#000000"

"><tr height=""30""><td valign=""center"" width=160>#3 ColdMill</td><td width=80>Through Previous Day</td><td width=80>11-7</td><td width=80>7-3</td><td width=80>3-11</td><td width=80>Day</td><td width=80>MTD</td></tr>"

      'These doubly subscripted arrays are divided into columns the same way the first set of arrays were, but they now contain 2 rows, 0 for 4 line and 1 for 5 line

      Dim pklTons(2,6)

      Dim pklHours(2,6)

      Dim pklDelayMinutes(2,6)

      Dim pklTurns(2,6)

      Dim pklTonsPerHour(2,6)

      Dim pklAvailability(2,6)

      Dim pklParamList(3)

      Dim pklDelayParamList(3)

      pklParamList(0) = "#" & ParamList(0)

      pklParamList(1) = "#" & ParamList(1)

      Dim line

      Dim pklInfoHandle

      Dim pklDelayHandle

      For line = 0 to 1

            pklParamList(2) = "40" & (line + 4)

            pklInfoHandle = RunQuery("PicklerProductio

n", "C:\Inetpub\wwwroot\pickle

r\SQL\pklr

ptTurnsQue

ry.sql", pklParamList)

            'Because the production date field of the pickler pro database does not update correctly for delays, we must figure out the exact start and end

            'time of the turn and search based on that.

            getProductionTimes pklParamList(2), ParamList(0), ParamList(1)

            'Response.Write(pklParamLi

st(0) & " " & pklParamList(1) & " " & pklParamList(2) & "<br>")

            'Response.Write(Production

StartTime & " " & DayStartTime & " " & ProductionEndTime & "<br>")

            pklDelayParamList(0) = "#" & ProductionStartTime

            pklDelayParamList(1) = "#" & ProductionEndTime

            pklDelayParamList(2) = pklParamList(2)

            pklDelayHandle = RunQuery("PicklerProductio

n", "C:\Inetpub\wwwroot\pickle

r\SQL\pklr

ptDelayQue

ry.sql", pklDelayParamList)

            While Not RecSet(pklInfoHandle).EOF

                  If cDate(RecSet(pklInfoHandle

)("PRODUCT

ION_DATE")

) = cDate(reportDate) Then

                        Turn = RecSet(pklInfoHandle)("TUR

N")

                        pklTons(line, Turn) = RecSet(pklInfoHandle)("EXI

T_WEIGHT")

/ 2000 + RecSet(pklInfoHandle)("EXI

T_SCRAP_CO

IL_WEIGHT"

) / 2000

                        pklTons(line, 4) = pklTons(line, 4) + RecSet(pklInfoHandle)("EXI

T_WEIGHT")

/ 2000 + RecSet(pklInfoHandle)("EXI

T_SCRAP_CO

IL_WEIGHT"

) / 2000

                        pklHours(line, Turn) = RecSet(pklInfoHandle)("TUR

N_DURATION

_HOURS")

                        pklHours(line, 4) = pklHours(line, 4) + RecSet(pklInfoHandle)("TUR

N_DURATION

_HOURS")

                        'pklDelayMinutes(line, Turn) = RecSet(pklInfoHandle)("TOT

AL_DELAY_M

INUTES")

                        'pklDelayMinutes(line, 4) = pklDelayMinutes(line, 4) + RecSet(pklInfoHandle)("TOT

AL_DELAY_M

INUTES")

                        pklTurns(line, Turn) = 1

                        pklTurns(line, 4) = pklTurns(line, 4) + 1

                  Else

                        pklTons(line, 0) = pklTons(line, 0) + RecSet(pklInfoHandle)("EXI

T_WEIGHT")

/ 2000 + RecSet(pklInfoHandle)("EXI

T_SCRAP_CO

IL_WEIGHT"

) / 2000

                        pklHours(line, 0) = pklHours(line, 0) + RecSet(pklInfoHandle)("TUR

N_DURATION

_HOURS")

                        'pklDelayMinutes(line, 0) = pklDelayMinutes(line, 0) + RecSet(pklInfoHandle)("TOT

AL_DELAY_M

INUTES")

                        pklTurns(line, 0) = pklTurns(line, 0) + 1

                  End If

                  pklTons(line, 5) = pklTons(line, 5) + RecSet(pklInfoHandle)("EXI

T_WEIGHT")

/ 2000 + RecSet(pklInfoHandle)("EXI

T_SCRAP_CO

IL_WEIGHT"

) / 2000

                  pklHours(line, 5) = pklHours(line, 5) + RecSet(pklInfoHandle)("TUR

N_DURATION

_HOURS")

                  'pklDelayMinutes(line, 5) = pklDelayMinutes(line, 5) + RecSet(pklInfoHandle)("TOT

AL_DELAY_M

INUTES")

                  pklTurns(line, 5) = pklTurns(line, 5) + 1

                  RecSet(pklInfoHandle).Move

Next      

            Wend

            While Not RecSet(pklDelayHandle).EOF

                  Turn = RecSet(pklDelayHandle)("TU

RN")

                  If cDate(RecSet(pklDelayHandl

e)("DELAY_

STARTING_D

ATE_TIME")

) > cDate(DayStartTime) Then

                        pklDelayMinutes(line, Turn) = pklDelayMinutes(line, Turn) + RecSet(pklDelayHandle)("DE

LAY_DURATI

ON_MINUTES

")

                        pklDelayMinutes(line, 4) = pklDelayMinutes(line, 4) + RecSet(pklDelayHandle)("DE

LAY_DURATI

ON_MINUTES

")

                  Else

                        pklDelayMinutes(line, 0) = pklDelayMinutes(line, 0) + RecSet(pklDelayHandle)("DE

LAY_DURATI

ON_MINUTES

")

                  End If

                  pklDelayMinutes(line, 5) = pklDelayMinutes(line, 5) + RecSet(pklDelayHandle)("DE

LAY_DURATI

ON_MINUTES

")

                  RecSet(pklDelayHandle).Mov

eNext

            Wend

            CloseRS(pklInfoHandle)

      Next

      For line = 0 to 1

            For Turn = 0 to 5

                  If pklHours(line, Turn) <> 0 Then

                        pklTonsPerHour(line, Turn) = pklTons(line, Turn) / pklHours(line, Turn)

                        pklAvailability(line, Turn) = (pklHours(line, Turn) - pklDelayMinutes(line, Turn)/60) / pklHours(line, Turn) * 100

                  End If

            Next

      Next

      Dim pklTableStart

      pklTableStart = "<table border=1 width=640 cellspacing=0 bordercolorlight=""#000000

"" bordercolordark=""#000000"

"><tr height=""30""><td valign=""center"" width=160>#4 & #5 Pickler</td><td width=80>Through Previous Day</td><td width=80>11-7</td><td width=80>7-3</td><td width=80>3-11</td><td width=80>Day</td><td width=80>MTD</td></tr>"

%>

0
August 16, 2011

Do this: try setting the date value that goes to the query in this order: YYYY-MM-DD, since that's what it looks like Oracle is expecting. If that doesn't work, try this: YYYY-DD-MM

For "YYYY-MM-DD", these:

ParamList(1) = reportDate

ParamList(0) = Month(reportDate) & " /1/ " & Year(reportDate)

would change to:

ParamList(1) = Year(reportDate) & "/" & Month(reportDate) & "/" & Day(reportDate)

ParamList(0) = Year(reportDate) & "/" & Month(reportDate) & " /01

0
August 16, 2011

correction:

should maybe be:

ParamList(1) = Year(reportDate) & "-" & Month(reportDate) & "-" & Day(reportDate)

ParamList(0) = Year(reportDate) & "-" & Month(reportDate) & " -01

0
August 16, 2011

YOU GOT IT!!!!! AND THAT PAGE WORKS THANKS SO MUCH FOR YOUR TIME.

BUT FOR SOME REASON IT CAUSED AN ERROR TO THE PAGE THAT IT IS CONNECTED TO NOT TO WORK. im going to look to see if i can fix the error but if you see anything obvious let me know.

ADODB.Recordset error '800a0cc1'

Item cannot be found in the collection corresponding to the requested name or ordinal.

/PICKLER/cm/exec_report_cm

.asp, line 32

THIS LINE 32 IS PUT WITH ********

<!--#include file="daily_breakdown_cm_c

ode.asp"--

>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<meta name="GENERATOR" content="Microsoft FrontPage 4.0">

<meta name="ProgId" content="FrontPage.Editor.

Document">

<title>Morning Executive Report</title>

</head>

<body bgcolor="#000000" text="#FFFFFF">

<%

'On Error Resume Next

Dim WorkRollsChanged(4)

Dim RollChangeOcc(4)

Dim RollChangeMins(4)

Dim DelayDescriptions(4)

Function getRollChanges

      Dim ParamList(3)

      Dim DelayHandle

      ParamList(0) = "#" & reportDate

      ParamList(1) = "#" & reportDate

      ParamList(2) = "%"

      Dim turn

      Dim stand

      DelayHandle = RunQuery("ColdMillProducti

on", "C:\Inetpub\wwwroot\pickle

r\SQL\cmpr

oDelayBrea

kdownQuery

.sql", ParamList)

      While Not RecSet(DelayHandle).EOF

****************turn = cStr(RecSet(DelayHandle)("

TURN"))

            If cStr(RecSet(DelayHandle)("

EVENT_REAS

ON_CODE"))

= "200" Then

                  RollChangeOcc(turn) = RollChangeOcc(turn) + 1

                  RollChangeMins(turn) = RollChangeMins(turn) + cInt(RecSet(DelayHandle)("

EVENT_MIN"

))

            End If

            DelayDescriptions(turn) = DelayDescriptions(turn) & "<tr><td> </td><td colspan=10>"

            DelayDescriptions(turn) = DelayDescriptions(turn) & RecSet(DelayHandle)("EVENT

_MIN") & " mins.: "

            DelayDescriptions(turn) = DelayDescriptions(turn) & Trim(RecSet(DelayHandle)("

DELAY_REAS

ON_DEF"))

            If Trim(RecSet(DelayHandle)("

EVENT_COMM

ENT")) <> "" Then      

                  DelayDescriptions(turn) = DelayDescriptions(turn) & "-" & Trim(RecSet(DelayHandle)("

EVENT_COMM

ENT"))

            End If

            For stand = 1 to 5

                  If RecSet(DelayHandle)("stand

_" & stand & "_affected") Then

                        DelayDescriptions(turn) = DelayDescriptions(turn) & ", " & stand

                  End If

            Next

            DelayDescriptions(turn) = DelayDescriptions(turn) & "</td></tr>"

            RecSet(DelayHandle).MoveNe

xt

      Wend

      CloseRS(DelayHandle)

      DelayHandle = RunQuery("ColdMillProducti

on", "C:\Inetpub\wwwroot\pickle

r\SQL\cmpr

oDelayStan

dsQuery.sq

l", ParamList)

      While Not RecSet(DelayHandle).EOF

            turn = cStr(RecSet(DelayHandle)("

TURN"))

            If RecSet(DelayHandle)("WR_CH

ANGED_SFLA

G") Then

                  WorkRollsChanged(turn) = WorkRollsChanged(turn) + 1

            End If

            RecSet(DelayHandle).MoveNe

xt

      Wend

      CloseRS(DelayHandle)

End Function

getRollChanges

%>

<table width=640 border=0 cellpadding=0 cellspacing=0>

<tr><td width=60></td><td width=58></td><td width=58></td><td width=58></td><td width=58></td><td width=58></td><td width=58></td><td width=58></td><td width=58></td><td width=58></td><td width=58></td></tr>

<tr><td><b>To:</b></td><td

colspan=7><b>Middletown Works Plant Manager (Fax 3935)</td><td colspan=3><b><u>No. 3 Cold Strip Mill</u></b></td></tr>

<tr><td colspan=11> </td></tr

>

<tr><td><b>From:</b></td><

td colspan=5><b>Cold Strip Department Manager</b></td><td align="right"><b>Date:</b>

</td><td alight="left"><%=reportDat

e%></td><t

d> </

td><td><b>

Day:</b></

td><td><%=

WeekDayNam

e(WeekDay(

reportDate

))%></td><

/tr>

<tr><td colspan=11> </td></tr

>

<tr><td><b>Subject:</b></t

d><td colspan=10><b>Executive Morning Report</b></td></tr>

<tr><td colspan=11> </td></tr

>

<tr><td colspan=2>COLD STRIP MILL</td><td>% Avail</td><td>R/Hr Eff</td><td>Tons</td><td>T

/H</td><td

>Turns</td

><td>Hours

</td><td>#

/Ft.</td><

td>T/Coil<

/td><td>&n

bsp;</td><

/tr>

<tr><td colspan=11> </td></tr

>

<tr><td>Day:</td><td>&nbsp

;</td><td>

<%=FormatN

umber(Avai

lability(4

), 1)%>%</td><td><%=FormatNum

ber(FeetPe

rRollHourE

ff(4), 1)%></td><td><%=FormatNumb

er(Tons(4)

, 0)%></td><td><%=FormatNumb

er(TonsPer

Hour(4), 1)%></td><td><%=FormatNumb

er(Turns(4

), 0)%></td><td><%=FormatNumb

er(Hours(4

), 1)%></td><td><%=FormatNumb

er(PoundsP

erFoot(4),

1)%></td><td><%=FormatNumb

er(TonsPer

Coil(4), 1)%></td></tr>

<tr><td colspan=11> </td></tr

>

<tr><td>MTD:</td><td>&nbsp

;</td><td>

<%=FormatN

umber(Avai

lability(5

), 1)%>%</td><td><%=FormatNum

ber(FeetPe

rRollHourE

ff(5), 1)%></td><td><%=FormatNumb

er(Tons(5)

, 0)%></td><td><%=FormatNumb

er(TonsPer

Hour(5), 1)%></td><td><%=FormatNumb

er(Turns(5

), 0)%></td><td><%=FormatNumb

er(Hours(5

), 1)%></td><td><%=FormatNumb

er(PoundsP

erFoot(5),

1)%></td><td><%=FormatNumb

er(TonsPer

Coil(5), 1)%></td></tr>

<tr><td colspan=11> </td></tr

>

<tr><td colspan=11> </td></tr

>

<tr><td colspan=11><center>Operati

ng Information on Turn Basis:</center></td></tr>

<tr><td colspan=11> </td></tr

>

<%

Dim hrs

For turn = 1 to 3

Select Case turn

      Case 1

            hrs = "11-7"

      Case 2

            hrs = "7-3"

      Case 3

            hrs = "3-11"

End Select

%>

<tr><td colspan=11><center><b>Turn

: <%=turn%>: <%=hrs%></b></center></td>

</tr>

<tr><td colspan=2>Pcs. On/Off Mill</td><td><%=CoilsIn(tu

rn) & "/" & CoilsOut(turn)%></td><td>T

ons:</td><

td><%=Form

atNumber(T

ons(turn),

0)%></td><td>Feet:</td><td

colspan=2><%=FormatNumber(

LinearFeet

(turn) * 1000, 0)%></td><td>TPH:</td><td colspan=2><%=FormatNumber(

TonsPerHou

r(turn), 1)%></td></tr>

<tr><td colspan=2 align="right">Availability

: </t

d><td><%=F

ormatNumbe

r(Availabi

lity(turn)

, 1)%>%</td><td colspan=8>Changed <%=WorkRollsChanged(turn)%

> mills on <%=RollChangeOcc(turn)%> ocurences totaling <%=RollChangeMins(turn)%> minutes</td></tr>

<tr><td colspan=11> </td></tr

>

<%=DelayDescriptions(turn)

%>

<tr><td colspan=11> </td></tr

>

<tr><td colspan=6> </td><td align="right" colspan=2>Avg. Width:</td><td>In Dev.</td><td>#/Ft:</td><td

><%=Format

Number(Pou

ndsPerFoot

(turn), 1)%></td></tr>

<tr><td colspan=6> </td><td colspan=2 align="right">Avg. Gage:</td><td>In Dev.<%'=FormatNumber(Avera

geGauge(tu

rn), 3)%></td><td>CSA:</td><td>

<%=FormatN

umber(CSA(

Turn), 1)%></td></tr>

<tr><td colspan=11> </td></tr

>

<tr><td colspan=11> </td></tr

>

<%Next%>

</body>

<%=CloseCon%>

0
August 16, 2011

The error means that you either have no records in your recordset, or your records do not contain a "TURN" column in the returned recordset.

0
August 16, 2011

well wait i think it becasue i had not put that name in the query sql.

ill get back with ya

thanks again.

0
August 16, 2011

YUP THATS WHAT IT WAS.

I JUST GOTA TWICK SOME NUMBERS

THANKS SO MUCH!!!!!

AND THANKS FOR YOUR TIME U WERE SUCH A SUPER HELPER!!!

Related Questions

Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E57)

Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E57) [Oracle][ODBC][Rdb]%RDB-E- ARITH_EXCE PT, truncation of a numeric value at runtime -SQL-F-DATCONERR, Data conversion error for strin Read More

Views

18

Votes

0

Answers

6

August 16, 2011

asp error [Oracle][ODBC][Rdb]%RDB-E-ARITH_EXCEPT

This is an error i had got once before but changing arount the date didnt help. It was back from Q_21633478.html. and it give me this error instead now. Error Type: Microsoft OLE DB Provider for ODBC Read More

Views

13

Votes

0

Answers

5

August 16, 2011

This is the very first question

Hello guys! This is the first post in this site Read More

Views

2k

Votes

4

Answers

2

January 08, 2016

report values not showing up.

I have a crystal report which I pass a DataSet to using VB.NET. The report was working fine, but then I make some changes to the import query and now nothing shows up in the crystal report. Crystal do Read More

Views

1k

Votes

0

Answers

12

September 06, 2005

Event log doesn't overwrite as needed in SP4

Hello All, After upgrading from SP3 to SP4 on several Windows 2000 PRO machines everything looked fine, but from time to time applications can&#39;t write to the event log. When I try to view the appl Read More

Views

1k

Votes

0

Answers

9

May 11, 2003

"Failed to self-register XYZ.dll"

Hi there, I wrote a OLE-automation-server DLL in VB4.0. I use Installshield Express to install it as part of my program on the target computers. Now on some computers I get the message &quot;Failed to Read More

Views

1k

Votes

0

Answers

2

November 08, 1998

Please help understand these notes on image processing

Can someone please help me understand these lecture notes... On the right of the page; What does &quot;normalised by one notion of the area of a pixel&quot; mean? On the first formula for A, Is that a Read More

Views

1k

Votes

0

Answers

3

February 05, 2009

Can someone please explain this paragram on the chain rule in image processing

Please see the screenshot, How is 3133030 got from 10103322? Read More

Views

1k

Votes

0

Answers

1

January 05, 2009

AD on 2003

We have created an AD Domain on Windows 2000 Server with no problems. We just created an AD Domain on Windows 2003 and we&#39;re getting some weird problems. Both of these domains are behind firewalls Read More

Views

1k

Votes

0

Answers

15

May 11, 2003

ADDT ASP Upload Error " Type mismatch: 'tNG_isFileInsideBaseFolder' "

I am trying to create a simple insert record and upload image function on an ASP page built using Adobe Dreamweaver Developer Toolkit. I have done this many times before with no problem, however, i ha Read More

Views

1k

Votes

0

Answers

0

November 02, 2008

MYSQL Select query with custom ORDER BY

Hi, is it possible to customize the order of the returned rows in mysql? Example: I have a Table with a column &quot;name&quot;, now I want to have all entries ordered by name, but I want the entries Read More

Views

1k

Votes

0

Answers

5

July 02, 2010

Folder Redirection in Server 2003

We have a Windows Server 2003 Standard Ed. Is there a way to redirect the users my documents to a folder that has already been created on the server? Read More

Views

934

Votes

0

Answers

2

July 05, 2007

Partiton magic  version 8.0 having error 1523 while executing batch

I followed the partition magic 8.0 wizard to partition my hard disk while rebooting &#160;I came across this problem &#160;&quot;error 1523 while executing batch&quot; What can I do to solve this prob Read More

Views

859

Votes

0

Answers

2

May 11, 2003

Please explain this paragraph in image processing (screenshot attached)

Two questions; How is the equation (10.1-15) formed? &quot;are isotropic for rotation increments of 90 degrees and 45 degrees respectively&quot; What does this mean Read More

Views

656

Votes

0

Answers

7

January 05, 2009

xp_cmdshell with net use

Hi, when I use &#39;net use \192.168.0.1\c$ password /user:username&#39; at the command prompt, it works fine. &#160;But if i try to use it in sql with &quot; exec master..xp_cmdshell &#39;net use \19 Read More

Views

614

Votes

0

Answers

5

April 11, 2003

hp ux11

i have a hp ux11 server. and i edited the /etc/resolv.conf to use my win2003 server dns server. That went fine, however, I would like to go the other way and add an entry on my win2003 dns to resolve Read More

Views

356

Votes

0

Answers

3

October 12, 2009

Using an application over a LAN

I have written an application that needs to be used on a LAN. &#160;The application setup wizard takes care of registering everything on a single PC, but how do you go about writing a setup program th Read More

Views

312

Votes

0

Answers

9

August 07, 1998

Need subnet of 12 IPs.

Please, Can someone help me to create a subnet consisting of 12 IP&#39;s. Thanks.. Read More

Views

310

Votes

0

Answers

5

April 11, 2003

Drill down in a cross-tabl report

Hello, Would some experts to show me if it is possible to do drill-up or drill-down (or both) in a cross-tab report? I would also like to know if it is possible to control what fields to be displayed/ Read More

Views

252

Votes

0

Answers

0

September 06, 2005

Using RDO, Enterprise V Professional

We would like to use RDO on our project made up of 4 developers. Do we need to have a copy of Enterprise for each developer or is it possible to use Professional for those developers not writing the R Read More

Views

299

Votes

0

Answers

6

January 07, 1998