Question

ASP page data selection Error

Asked by: SamuelClemmons

I have two ASP pages. First page: tbl_RM_Materials_Results.asp and tbl_RM_Materials)_Update.asp.

The first page does what I want it to which is draw its data from a view called:

RMateral_RM_Materials which selects the most recent record from one of two tables associated with a particular barcode and presents that data in the ASP page tbl_RM_Materials.asp.

This page once it has retrieved this record is then supposed to send that record to the page tbl_RM_Materials_Update.asp where the record will be updated via the drop down fields and manual updates to the records fields.

Once the record has been updated it is then sent back to the page tbl_RM_Materials.asp where the page is now looking at the table tbl_RM_Materials .

The record that was just updated should be the record that is being currently viewed by the page tbl_RM_Materials.asp and it should be in the database tbl_RM_Materials.


The problem is that record being viewed by tbl_RM_Materials_Update.asp is incorrect and it is looking at the wrong database.

Also the record selected by the page tbl_RM_Materials.asp was not presented in the page tbl_RM_Materials_Update.asp to allow for changes.


I am using SQL Server 2000

Any suggestions?

First Page that functions.
__________________________________________________________________________
 
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/veneermove.asp" -->
<!--#include file="WA_DataAssist/WA_AppBuilder_VB.asp" -->
<%
If Session("dbotbl_RM_Materials_Results_QueryString") <> "" AND Request.ServerVariables("QUERY_STRING") = "" Then
Response.Redirect("tbl_RM_Materials_Results.asp?" & Session("dbotbl_RM_Materials_Results_QueryString"))
Else
Session("dbotbl_RM_Materials_Results_QueryString") = Request.QueryString
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_BCODE
WADAdbotbl_RM_Materials__ParamRM_BCODE = "-1"
If (cStr(Request("S_RM_BCODE")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_BCODE = cStr(Request("S_RM_BCODE"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_DateTime
WADAdbotbl_RM_Materials__ParamRM_DateTime = "1/1/1"
If (cStr(Request("S_RM_DateTime")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_DateTime = cStr(Request("S_RM_DateTime"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_PurchOrd
WADAdbotbl_RM_Materials__ParamRM_PurchOrd = "-1"
If (cStr(Request("S_RM_PurchOrd")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_PurchOrd = cStr(Request("S_RM_PurchOrd"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Location
WADAdbotbl_RM_Materials__ParamRM_Location = "-1"
If (cStr(Request("S_RM_Location")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Location = cStr(Request("S_RM_Location"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Supplier
WADAdbotbl_RM_Materials__ParamRM_Supplier = "-1"
If (cStr(Request("S_RM_Supplier")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Supplier = cStr(Request("S_RM_Supplier"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Grade
WADAdbotbl_RM_Materials__ParamRM_Grade = "-1"
If (cStr(Request("S_RM_Grade")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Grade = cStr(Request("S_RM_Grade"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Thickness
WADAdbotbl_RM_Materials__ParamRM_Thickness = "-1"
If (cStr(Request("S_RM_Thickness")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Thickness = cStr(Request("S_RM_Thickness"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Quantity
WADAdbotbl_RM_Materials__ParamRM_Quantity = "-1"
If (cStr(Request("S_RM_Quantity")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Quantity = cStr(Request("S_RM_Quantity"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Status
WADAdbotbl_RM_Materials__ParamRM_Status = "-1"
If (cStr(Request("S_RM_Status")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Status = cStr(Request("S_RM_Status"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Product
WADAdbotbl_RM_Materials__ParamRM_Product = "-1"
If (cStr(Request("S_RM_Product")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Product = cStr(Request("S_RM_Product"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials
Dim WADAdbotbl_RM_Materials_numRows
 
Set WADAdbotbl_RM_Materials = Server.CreateObject("ADODB.Recordset")
WADAdbotbl_RM_Materials.ActiveConnection = MM_veneermove_STRING
WADAdbotbl_RM_Materials.Source = "SELECT *  FROM dbo.RMaterial_RM_Materials  WHERE (RM_BCODE LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "') AND (RM_DateTime = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "' OR '1/1/1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "') AND (RM_PurchOrd LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "') AND (RM_Location LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "') AND (RM_Supplier LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "') AND (RM_Grade LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "') AND (RM_Thickness LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "') AND (RM_Quantity LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "') AND (RM_Status LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "') AND (RM_Product LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "')  ORDER BY RM_DateTime DESC"
WADAdbotbl_RM_Materials.CursorType = 0
WADAdbotbl_RM_Materials.CursorLocation = 2
WADAdbotbl_RM_Materials.LockType = 1
WADAdbotbl_RM_Materials.Open()
 
WADAdbotbl_RM_Materials_numRows = 0
%>
<%
Dim WADAdbotbl_RM_Materials_1__numRows
Dim WADAdbotbl_RM_Materials_1__index
 
WADAdbotbl_RM_Materials_1__numRows = 1
WADAdbotbl_RM_Materials_1__index = 0
WADAdbotbl_RM_Materials_numRows = WADAdbotbl_RM_Materials_numRows + WADAdbotbl_RM_Materials_1__numRows
%>
<%
'  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
 
Dim WADAdbotbl_RM_Materials_total
Dim WADAdbotbl_RM_Materials_first
Dim WADAdbotbl_RM_Materials_last
 
' set the record count
WADAdbotbl_RM_Materials_total = WADAdbotbl_RM_Materials.RecordCount
 
' set the number of rows displayed on this page
If (WADAdbotbl_RM_Materials_numRows < 0) Then
  WADAdbotbl_RM_Materials_numRows = WADAdbotbl_RM_Materials_total
Elseif (WADAdbotbl_RM_Materials_numRows = 0) Then
  WADAdbotbl_RM_Materials_numRows = 1
End If
 
' set the first and last displayed record
WADAdbotbl_RM_Materials_first = 1
WADAdbotbl_RM_Materials_last  = WADAdbotbl_RM_Materials_first + WADAdbotbl_RM_Materials_numRows - 1
 
' if we have the correct record count, check the other stats
If (WADAdbotbl_RM_Materials_total <> -1) Then
  If (WADAdbotbl_RM_Materials_first > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_first = WADAdbotbl_RM_Materials_total
  End If
  If (WADAdbotbl_RM_Materials_last > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_last = WADAdbotbl_RM_Materials_total
  End If
  If (WADAdbotbl_RM_Materials_numRows > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_numRows = WADAdbotbl_RM_Materials_total
  End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
 
If (WADAdbotbl_RM_Materials_total = -1) Then
 
  ' count the total records by iterating through the recordset
  WADAdbotbl_RM_Materials_total=0
  While (Not WADAdbotbl_RM_Materials.EOF)
    WADAdbotbl_RM_Materials_total = WADAdbotbl_RM_Materials_total + 1
    WADAdbotbl_RM_Materials.MoveNext
  Wend
 
  ' reset the cursor to the beginning
  If (WADAdbotbl_RM_Materials.CursorType > 0) Then
    WADAdbotbl_RM_Materials.MoveFirst
  Else
    WADAdbotbl_RM_Materials.Requery
  End If
 
  ' set the number of rows displayed on this page
  If (WADAdbotbl_RM_Materials_numRows < 0 Or WADAdbotbl_RM_Materials_numRows > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_numRows = WADAdbotbl_RM_Materials_total
  End If
 
  ' set the first and last displayed record
  WADAdbotbl_RM_Materials_first = 1
  WADAdbotbl_RM_Materials_last = WADAdbotbl_RM_Materials_first + WADAdbotbl_RM_Materials_numRows - 1
  
  If (WADAdbotbl_RM_Materials_first > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_first = WADAdbotbl_RM_Materials_total
  End If
  If (WADAdbotbl_RM_Materials_last > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_last = WADAdbotbl_RM_Materials_total
  End If
 
End If
%>
<%
Dim MM_paramName 
%>
<%
' *** Move To Record and Go To Record: declare variables
 
Dim MM_rs
Dim MM_rsCount
Dim MM_size
Dim MM_uniqueCol
Dim MM_offset
Dim MM_atTotal
Dim MM_paramIsDefined
 
Dim MM_param
Dim MM_index
 
Set MM_rs    = WADAdbotbl_RM_Materials
MM_rsCount   = WADAdbotbl_RM_Materials_total
MM_size      = WADAdbotbl_RM_Materials_numRows
MM_uniqueCol = ""
MM_paramName = ""
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName <> "") Then
  MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
End If
%>
<%
' *** Move To Record: handle 'index' or 'offset' parameter
 
if (Not MM_paramIsDefined And MM_rsCount <> 0) then
 
  ' use index parameter if defined, otherwise use offset parameter
  MM_param = Request.QueryString("index")
  If (MM_param = "") Then
    MM_param = Request.QueryString("offset")
  End If
  If (MM_param <> "") Then
    MM_offset = Int(MM_param)
  End If
 
  ' if we have a record count, check if we are past the end of the recordset
  If (MM_rsCount <> -1) Then
    If (MM_offset >= MM_rsCount Or MM_offset = -1) Then  ' past end or move last
      If ((MM_rsCount Mod MM_size) > 0) Then         ' last page not a full repeat region
        MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
      Else
        MM_offset = MM_rsCount - MM_size
      End If
    End If
  End If
 
  ' move the cursor to the selected record
  MM_index = 0
  While ((Not MM_rs.EOF) And (MM_index < MM_offset Or MM_offset = -1))
    MM_rs.MoveNext
    MM_index = MM_index + 1
  Wend
  If (MM_rs.EOF) Then 
    MM_offset = MM_index  ' set MM_offset to the last possible record
  End If
 
End If
%>
<%
' *** Move To Record: if we dont know the record count, check the display range
 
If (MM_rsCount = -1) Then
 
  ' walk to the end of the display range for this page
  MM_index = MM_offset
  While (Not MM_rs.EOF And (MM_size < 0 Or MM_index < MM_offset + MM_size))
    MM_rs.MoveNext
    MM_index = MM_index + 1
  Wend
 
  ' if we walked off the end of the recordset, set MM_rsCount and MM_size
  If (MM_rs.EOF) Then
    MM_rsCount = MM_index
    If (MM_size < 0 Or MM_size > MM_rsCount) Then
      MM_size = MM_rsCount
    End If
  End If
 
  ' if we walked off the end, set the offset based on page size
  If (MM_rs.EOF And Not MM_paramIsDefined) Then
    If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
      If ((MM_rsCount Mod MM_size) > 0) Then
        MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
      Else
        MM_offset = MM_rsCount - MM_size
      End If
    End If
  End If
 
  ' reset the cursor to the beginning
  If (MM_rs.CursorType > 0) Then
    MM_rs.MoveFirst
  Else
    MM_rs.Requery
  End If
 
  ' move the cursor to the selected record
  MM_index = 0
  While (Not MM_rs.EOF And MM_index < MM_offset)
    MM_rs.MoveNext
    MM_index = MM_index + 1
  Wend
End If
%>
<%
' *** Move To Record: update recordset stats
 
' set the first and last displayed record
WADAdbotbl_RM_Materials_first = MM_offset + 1
WADAdbotbl_RM_Materials_last  = MM_offset + MM_size
 
If (MM_rsCount <> -1) Then
  If (WADAdbotbl_RM_Materials_first > MM_rsCount) Then
    WADAdbotbl_RM_Materials_first = MM_rsCount
  End If
  If (WADAdbotbl_RM_Materials_last > MM_rsCount) Then
    WADAdbotbl_RM_Materials_last = MM_rsCount
  End If
End If
 
' set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
 
Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth
 
Dim MM_removeList
Dim MM_item
Dim MM_nextItem
 
' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
  MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If
 
MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""
 
' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
  End If
Next
 
' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
  End If
Next
 
' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then 
  MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "")  Then
  MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
  MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If
 
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>
<%
' *** Move To Record: set the strings for the first, last, next, and previous links
 
Dim MM_keepMove
Dim MM_moveParam
Dim MM_moveFirst
Dim MM_moveLast
Dim MM_moveNext
Dim MM_movePrev
 
Dim MM_urlStr
Dim MM_paramList
Dim MM_paramIndex
Dim MM_nextParam
 
MM_keepMove = MM_keepBoth
MM_moveParam = "index"
 
' if the page has a repeated region, remove 'offset' from the maintained parameters
If (MM_size > 1) Then
  MM_moveParam = "offset"
  If (MM_keepMove <> "") Then
    MM_paramList = Split(MM_keepMove, "&")
    MM_keepMove = ""
    For MM_paramIndex = 0 To UBound(MM_paramList)
      MM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=") - 1)
      If (StrComp(MM_nextParam,MM_moveParam,1) <> 0) Then
        MM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex)
      End If
    Next
    If (MM_keepMove <> "") Then
      MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
    End If
  End If
End If
 
' set the strings for the move to links
If (MM_keepMove <> "") Then 
  MM_keepMove = Server.HTMLEncode(MM_keepMove) & "&"
End If
 
MM_urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="
 
MM_moveFirst = MM_urlStr & "0"
MM_moveLast  = MM_urlStr & "-1"
MM_moveNext  = MM_urlStr & CStr(MM_offset + MM_size)
If (MM_offset - MM_size < 0) Then
  MM_movePrev = MM_urlStr & "0"
Else
  MM_movePrev = MM_urlStr & CStr(MM_offset - MM_size)
End If
%>
<%
'WA AltClass Iterator
class WA_AltClassIterator
  public ClassArray
  public ClassCounter
end class
 
function WA_AltClassIterator_getClass(loopObj, incrementClass) 
  if (UBound(loopObj.ClassArray) = 0) then
    WA_AltClassIterator_getClass = ""
    exit function
  end if
  if (incrementClass) then
    if (loopObj.ClassCounter > UBound(loopObj.ClassArray)) then
      loopObj.ClassCounter = 0
    end if
    loopObj.ClassCounter = loopObj.ClassCounter + 1
  end if
  if (loopObj.ClassCounter > 0) then
    WA_AltClassIterator_getClass = loopObj.ClassArray(loopObj.ClassCounter-1)
  else
    WA_AltClassIterator_getClass = loopObj.ClassArray(0)
  end if
end function
%>
<%
'WA Alternating Class
Dim WARRT_AltClass1
Set WARRT_AltClass1 = new WA_AltClassIterator
WARRT_AltClass1.ClassCounter = 0
WARRT_AltClass1.ClassArray = Split("WADAResultsRowDark|", "|")
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Results tbl_RM_Materials</title>
<link href="WA_DataAssist/styles/Modular_Pacifica.css" rel="stylesheet" type="text/css" />
<link href="WA_DataAssist/styles/Arial.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background-color: #95CAFF;
}
.style1 {font-size: 14px}
a:link {
	color: #1E23F9;
}
a:visited {
	color: #D80FDC;
}
a:hover {
	color: #000000;
}
a:active {
	color: #FF0000;
}
-->
</style></head>
 
<body>
 
<body onload="document.forms['WADASearchForm'].S_RM_BCODE.focus();">
 
<div class="WADASearchContainer">
  <form action="tbl_RM_Materials_Results.asp" method="get" name="WADASearchForm" id="WADASearchForm">
    <div class="WADAHeader style1">SCAN BAR CODE TO RETREIVE FROM FLOOR INVENTORY</div>
    <table class="WADADataTable" cellpadding="0" cellspacing="0" border="0">
      <tr>
        <th class="WADADataTableHeader"><div align="left">BCODE:</div></th>
        <td class="WADADataTableCell"><input type="text" name="S_RM_BCODE" id="S_RM_BCODE" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_DateTime" id="S_RM_DateTime" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_PurchOrd" id="S_RM_PurchOrd" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Location" id="S_RM_Location" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Supplier" id="S_RM_Supplier" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Grade" id="S_RM_Grade" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Thickness" id="S_RM_Thickness" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Quantity" id="S_RM_Quantity" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Status" id="S_RM_Status" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Product" id="S_RM_Product" value="" size="20" /></td>
      </tr>
    </table>
    <table width="620" border="0" align="right">
      <tr>
        <td>  <% If Not WADAdbotbl_RM_Materials.EOF Or Not WADAdbotbl_RM_Materials.BOF Then %>
  <div class="WADAResults">
    <div class="WADAResultsNavigation">
      <div class="WADAResultsCount">Records <%=(WADAdbotbl_RM_Materials_first)%> to <%=(WADAdbotbl_RM_Materials_last)%> of <%=(WADAdbotbl_RM_Materials_total)%></div>
      <div class="WADAResultsNavTop">
        <table border="0" cellpadding="0" cellspacing="0" class="WADAResultsNavTable">
          <tr valign="middle">
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If MM_offset <> 0 Then %><a href="<%=MM_moveFirst%>" ><img src="WA_DataAssist/images/Pacifica/Modular_firsttxt.gif" alt="First" name="First" width="56" height="17" border="0" id="First" /></a>
                  <% End If ' end MM_offset <> 0 %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If MM_offset <> 0 Then %><a href="<%=MM_movePrev%>" ><img src="WA_DataAssist/images/Pacifica/Modular_previoustxt.gif" alt="Previous" name="Previous" width="56" height="17" border="0" id="Previous" /></a>
                  <% End If ' end MM_offset <> 0 %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If Not MM_atTotal Then %><a href="<%=MM_moveNext%>" ><img src="WA_DataAssist/images/Pacifica/Modular_nexttxt.gif" alt="Next" name="Next" width="56" height="17" border="0" id="Next" /></a>
                  <% End If ' end Not MM_atTotal %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If Not MM_atTotal Then %><a href="<%=MM_moveLast%>" ><img src="WA_DataAssist/images/Pacifica/Modular_lasttxt.gif" alt="Last" name="Last" width="56" height="17" border="0" id="Last" /></a>
                  <% End If ' end Not MM_atTotal %></td>
          </tr>
        </table>
      </div>
      <div class="WADAResultsInsertButton">  </div>
    </div>
    <table class="WADAResultsTable" border="1" cellpadding="1" cellspacing="1">
      <% 
While ((WADAdbotbl_RM_Materials_1__numRows <> 0) AND (NOT WADAdbotbl_RM_Materials.EOF)) 
%>
      <tr class="<%=WA_AltClassIterator_getClass(WARRT_AltClass1,true)%>">
	  	<tr>
	    <th class="WADAResultsTableHeader">BCODE:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_BCODE").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Date Time:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_DateTime").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Purchase Order:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_PurchOrd").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Location:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Location").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Supplier:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Supplier").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Grade:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Grade").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Thickness:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Thickness").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Quantity:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Quantity").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Status:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Status").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Product:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Product").Value)%></td>
		</tr>
		<th></th>
        <td class="WADAResultsEditButtons" nowrap="nowrap"><table class="WADAEditButton_Table">
            <tr>
              <td></td>
              <td><a href="tbl_RM_Materials_Update.asp"><img src="WA_DataAssist/images/Pacifica/Modular_update.gif" alt="Update" name="Update" width="56" height="17" border="0" id="Update" /></a></td>
              <td></td>
            </tr>
        </table></td>
      </tr>
      <% 
  WADAdbotbl_RM_Materials_1__index=WADAdbotbl_RM_Materials_1__index+1
  WADAdbotbl_RM_Materials_1__numRows=WADAdbotbl_RM_Materials_1__numRows-1
  WADAdbotbl_RM_Materials.MoveNext()
Wend
%>
    </table>
    <div class="WADAResultsNavigation">
      <div class="WADAResultsCount">Records <%=(WADAdbotbl_RM_Materials_first)%> to <%=(WADAdbotbl_RM_Materials_last)%> of <%=(WADAdbotbl_RM_Materials_total)%></div>
      <div class="WADAResultsNavBottom">
        <table border="0" cellpadding="0" cellspacing="0" class="WADAResultsNavTable">
          <tr valign="middle">
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If MM_offset <> 0 Then %><a href="<%=MM_moveFirst%>" ><img src="WA_DataAssist/images/Pacifica/Modular_firsttxt.gif" alt="First" name="First" width="56" height="17" border="0" id="First" /></a>
                  <% End If ' end MM_offset <> 0 %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If MM_offset <> 0 Then %><a href="<%=MM_movePrev%>" ><img src="WA_DataAssist/images/Pacifica/Modular_previoustxt.gif" alt="Previous" name="Previous" width="56" height="17" border="0" id="Previous" /></a>
                  <% End If ' end MM_offset <> 0 %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If Not MM_atTotal Then %><a href="<%=MM_moveNext%>" ><img src="WA_DataAssist/images/Pacifica/Modular_nexttxt.gif" alt="Next" name="Next" width="56" height="17" border="0" id="Next" /></a>
                  <% End If ' end Not MM_atTotal %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If Not MM_atTotal Then %><a href="<%=MM_moveLast%>" ><img src="WA_DataAssist/images/Pacifica/Modular_lasttxt.gif" alt="Last" name="Last" width="56" height="17" border="0" id="Last" /></a>
                  <% End If ' end Not MM_atTotal %></td>
          </tr>
        </table>
      </div>
    </div>
  </div>
  <% End If ' end Not WADAdbotbl_RM_Materials.EOF Or NOT WADAdbotbl_RM_Materials.BOF %> <% If WADAdbotbl_RM_Materials.EOF And WADAdbotbl_RM_Materials.BOF Then %>
  <div class="WADANoResults">
    <div class="WADANoResultsMessage">No results for your search</div>
    <div> <a href="tbl_RM_Materials_Insert_Scarf.asp"><img border="0" name="Insert" id="Insert" alt="Insert" src="WA_DataAssist/images/Pacifica/Modular_insert.gif" /></a> </div>
  </div>
<% End If ' end WADAdbotbl_RM_Materials.EOF And WADAdbotbl_RM_Materials.BOF %> 
</td>
      </tr>
    </table>
    <div class="WADAButtonRow">
      <table class="WADADataNavButtons" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td class="WADADataNavButtonCell" nowrap="nowrap"><input name="Search" type="image" id="Search" value="Search" src="WA_DataAssist/images/Pacifica/Modular_search.gif" alt="Search" width="56" height="17" hspace="0" vspace="0" border="0"  /></td>
        </tr>
      </table>
    </div>
  </form>
</div>
<div class="WADAResultsContainer">
  <div class="WADAResultsHeader">
    <div class="WADAHeaderText">
	
  
  <form name="form3" method="post" action="http://localhost/tbl_RM_Materials_Insert_Scarf.asp">
    <input type="submit" name="Submit" value="Raw Materials">
  </form>
  <p>PRESS UPDATE TO CHANGE LOCATION OR MAKE CORRECTIONS</p>
  <p><a href="FloorMov_Instruc.htm" class="WADAHeaderText">Page Instructions</a> </p>
    </div>
  </div>
</body>
</html>
<%
WADAdbotbl_RM_Materials.Close()
Set WADAdbotbl_RM_Materials = Nothing
%>
 
_________________________________________________________________________
 
Second page which loads but is seeing the wrong record.
 
___________________________________________________________________________
 
 
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/veneermove.asp" -->
<!--#include file="WA_DataAssist/WA_AppBuilder_VB.asp" -->
<%
Dim WADAdbotbl_RM_Materials
Dim WADAdboRMaterial_RM_Materials_numRows
Dim WADAdboRMaterial_RM_Materials
Set WADAdboRMaterial_RM_Materials = Server.CreateObject("ADODB.Recordset")
WADAdboRMaterial_RM_Materials.ActiveConnection = MM_veneermove_STRING
WADAdboRMaterial_RM_Materials.Source = "SELECT RM_BCODE, RM_Datetime, RM_Supplier, RM_Product, RM_Grade, RM_Thickness, RM_Quantity, RM_PurchOrd  FROM dbo.RMaterial_RM_Materials"
WADAdboRMaterial_RM_Materials.CursorType = 0
WADAdboRMaterial_RM_Materials.CursorLocation = 2
WADAdboRMaterial_RM_Materials.LockType = 1
WADAdboRMaterial_RM_Materials.Open()
 
WADAdboRMaterial_RM_Materials_numRows = 0
%>
<%
Dim rs_Location
Dim rs_Location_numRows
 
Set rs_Location = Server.CreateObject("ADODB.Recordset")
rs_Location.ActiveConnection = MM_veneermove_STRING
rs_Location.Source = "SELECT LocationNum FROM dbo.tbl_location ORDER BY LocationNum ASC"
rs_Location.CursorType = 0
rs_Location.CursorLocation = 2
rs_Location.LockType = 1
rs_Location.Open()
 
rs_Location_numRows = 0
%>
<%
Dim rs_Status
Dim rs_Status_numRows
 
Set rs_Status = Server.CreateObject("ADODB.Recordset")
rs_Status.ActiveConnection = MM_veneermove_STRING
rs_Status.Source = "SELECT status FROM dbo.tbl_status ORDER BY status_ID ASC"
rs_Status.CursorType = 0
rs_Status.CursorLocation = 2
rs_Status.LockType = 1
rs_Status.Open()
 
rs_Status_numRows = 0
%>
<%
' WA Application Builder Update
if (cStr(Request.Form("Update.x")) <> "")  then
  WA_connection = MM_veneermove_STRING
  WA_table = "dbo.RMaterial_RM_Materials"
  WA_redirectURL = "tbl_RM_Materials_Results.asp"
  WA_keepQueryString = false
  WA_indexField = "RM_ID"
  WA_fieldNamesStr = "RM_ID|RM_BCODE|RM_DateTime|RM_PurchOrd|RM_Location|RM_Supplier|RM_Grade|RM_Thickness|RM_Quantity|RM_Status|RM_Product"
  WA_fieldValuesStr = "" & cStr(cStr(Request.Form("RM_ID"))) & """" & cStr(cStr(Request.Form("RM_BCODE"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_DateTime"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_PurchOrd"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Location"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Supplier"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Grade"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Thickness"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Quantity"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Status"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Product"))) & ""
  WA_columnTypesStr = "',none,''|',none,NULL|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|"
  WA_comparisonStr = " LIKE | = | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE "
  WA_fieldNames = Split(WA_fieldNamesStr,"|")
  WA_fieldValues = Split(WA_fieldValuesStr,"|")
  WA_columns = Split(WA_columnTypesStr,"|")
  WA_comparisions = Split(WA_comparisonStr, "|")
 
  WA_where_fieldValuesStr = "" & cStr(cStr(Request.Form("WADAUpdateRecordID"))) & ""
  WA_where_columnTypesStr = "none,none,NULL"
  WA_where_comparisonStr = "="
  WA_where_fieldNames = Split(WA_indexField,"|")
  WA_where_fieldValues = Split(WA_where_fieldValuesStr,"|")
  WA_where_columns = Split(WA_where_columnTypesStr,"|")
  WA_where_comparisions = Split(WA_where_comparisonStr, "|")
  
 
  updateParamsObj = WA_AB_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, -1)
  WhereObj = WA_AB_generateWhereClause(WA_where_fieldNames, WA_where_columns, WA_where_fieldValues, WA_where_comparisions)
  
  set MM_editCmd = Server.CreateObject("ADODB.Command")
  MM_editCmd.ActiveConnection = WA_connection
  MM_editCmd.CommandText = "UPDATE " & WA_table & " SET " & updateParamsObj(3) & " WHERE " & WhereObj & ""
  MM_editCmd.Execute()
  MM_editCmd.ActiveConnection.Close()
  if (WA_redirectURL <> "")  then
    if (WA_keepQueryString AND Request.QueryString <> "" AND Request.QueryString.Count > 0) then
      if (inStr(WA_redirectURL,"?") > 0)  then
	    WA_redirectURL = WA_redirectURL & "&"
      else
	    WA_redirectURL = WA_redirectURL & "?"
	  end if
      WA_redirectURL = WA_redirectURL & Request.QueryString
    end if
    Response.Redirect(WA_redirectURL)
  end if
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Update tbl_RM_Materials</title>
<link href="WA_DataAssist/styles/Modular_Poppy.css" rel="stylesheet" type="text/css" />
<link href="WA_DataAssist/styles/Arial.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background-color: #FFE8E8;
}
.style1 {color: #FF0000}
.style2 {font-size: 16}
.style11 {color: #FF0000; font-size: 16px; }
.style14 {font-size: 18px}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
 
<body onload="document.forms['WADAUpdateForm'].RM_Location.focus();">
<body>
 
<div id="Layer1" style="position:absolute; left:400px; top:200px; width:479px; height:56px; z-index:1"> 
  <p class="WADAHeaderText style14">To update the record choose new &quot;Location&quot; &amp; &quot;Status&quot;.</p>
  <p class="WADAHeaderText style2"><span class="style11"><span class="style14">To leave the record unchanged click &quot;Cancel&quot;</span>.</span> </p>
</div>
<div id="Layer2" style="position:absolute; left:308px; top:119px; width:171px; height:22px; z-index:2"><em><strong><span class="style1">RESET &quot;LOCATION!&quot;</span></strong></em></div>
<div id="Layer3" style="position:absolute; left:311px; top:288px; width:160px; height:25px; z-index:3" class="style1"><em><strong>RESET &quot;STATUS!&quot;</strong></em></div>
<div class="WADAUpdateContainer"> 
    <form action="tbl_RM_Materials_Update.asp" method="post" name="WADAUpdateForm" id="WADAUpdateForm">
      <div class="WADAHeader">Update Record: Select new location  and press update. </div>
      <table class="WADADataTable" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <th class="WADADataTableHeader"><div align="left">BCODE:</div></th>
          <td class="WADADataTableCell"><input type="text" name="RM_BCODE" id="RM_BCODE" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_BCODE").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Date Time:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_DateTime" id="RM_DateTime" value="<%response.write( now())%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"></th>
          <td class="WADADataTableCell"><input type="Hidden" readonly name="RM_PurchOrd" id="RM_PurchOrd" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_PurchOrd").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Location:</div></th>
          <td class="WADADataTableCell">
            <select name="RM_Location">
              <%
While (NOT rs_Location.EOF)
%>
              <option value="<%=(rs_Location.Fields.Item("LocationNum").Value)%>"><%=(rs_Location.Fields.Item("LocationNum").Value)%></option>
              <%
  rs_Location.MoveNext()
Wend
If (rs_Location.CursorType > 0) Then
  rs_Location.MoveFirst
Else
  rs_Location.Requery
End If
%>
          </select></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Supplier:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Supplier" id="RM_Supplier" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_Supplier").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Grade:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Grade" id="RM_Grade" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_Grade").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Thickness:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Thickness" id="RM_Thickness" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_Thickness").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Quantity:</div></th>
          <td class="WADADataTableCell"><input type="text" name="RM_Quantity" id="RM_Quantity" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_Quantity").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Status:</div></th>
          <td class="WADADataTableCell"><select name="RM_Status">
            <%
While (NOT rs_Status.EOF)
%>
            <option value="<%=(rs_Status.Fields.Item("status").Value)%>"><%=(rs_Status.Fields.Item("status").Value)%></option>
            <%
  rs_Status.MoveNext()
Wend
If (rs_Status.CursorType > 0) Then
  rs_Status.MoveFirst
Else
  rs_Status.Requery
End If
%>
          </select></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left"></div></th>
          <td class="WADADataTableCell"><input type="Hidden" readonly name="RM_Product" id="RM_Product" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_Product").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
      </table>
      <div class="WADAButtonRow">
        <table class="WADADataNavButtons" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td class="WADADataNavButtonCell" nowrap="nowrap"><input name="Update" type="image" id="Update" value="Update" src="WA_DataAssist/images/Poppy/Modular_update.gif" alt="Update" width="56" height="17" hspace="0" vspace="0" border="0"  /></td>
            <td class="WADADataNavButtonCell" nowrap="nowrap"><a href="tbl_RM_Materials_Results.asp"><img src="WA_DataAssist/images/Poppy/Modular_cancel.gif" alt="Cancel" name="Cancel" width="56" height="17" border="0" id="Cancel" /></a></td>
          </tr>
        </table>
<input name="WADAUpdateRecordID" type="hidden" id="WADAUpdateRecordID" value="<%=Server.URLEncode(request("RM_ID"))%>">
 
</div>
       <% If WADAdboRMaterial_RM_Materials.EOF And WADAdboRMaterial_RM_Materials.BOF Then %>
      <div class="WADANoResults">
        <div class="WADANoResultsMessage">No record found.</div>
      </div>
      <% End If ' end WADAdboRMaterial_RM_Materials.EOF And WADAdboRMaterial_RM_Materials.BOF %>
    </form>
	  <p>  <table border="0">
    <tr>
      <td>  
	  	
  <form name="form2" method="post" action="http://localhost/tbl_RM_Materials_Results.asp">
    <input type="submit" name="Submit" value="Floor Inventory">
  </form>
  <form name="form3" method="post" action="http://localhost/tbl_RM_Materials_Insert_Scarf.asp">
    <input type="submit" name="Submit" value="Raw Materials Page">
  </form>
</td>
    </tr>
  </table>
&nbsp;</p>
 
</div>
</body>
</html>
<%
WADAdboRMaterial_RM_Materials.Close()
Set WADAdboRMaterial_RM_Materials = Nothing
%>
<%
rs_Location.Close()
Set rs_Location = Nothing
%>
<%
rs_Status.Close()
Set rs_Status = Nothing
%>

                                  
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
513:
514:
515:
516:
517:
518:
519:
520:
521:
522:
523:
524:
525:
526:
527:
528:
529:
530:
531:
532:
533:
534:
535:
536:
537:
538:
539:
540:
541:
542:
543:
544:
545:
546:
547:
548:
549:
550:
551:
552:
553:
554:
555:
556:
557:
558:
559:
560:
561:
562:
563:
564:
565:
566:
567:
568:
569:
570:
571:
572:
573:
574:
575:
576:
577:
578:
579:
580:
581:
582:
583:
584:
585:
586:
587:
588:
589:
590:
591:
592:
593:
594:
595:
596:
597:
598:
599:
600:
601:
602:
603:
604:
605:
606:
607:
608:
609:
610:
611:
612:
613:
614:
615:
616:
617:
618:
619:
620:
621:
622:
623:
624:
625:
626:
627:
628:
629:
630:
631:
632:
633:
634:
635:
636:
637:
638:
639:
640:
641:
642:
643:
644:
645:
646:
647:
648:
649:
650:
651:
652:
653:
654:
655:
656:
657:
658:
659:
660:
661:
662:
663:
664:
665:
666:
667:
668:
669:
670:
671:
672:
673:
674:
675:
676:
677:
678:
679:
680:
681:
682:
683:
684:
685:
686:
687:
688:
689:
690:
691:
692:
693:
694:
695:
696:
697:
698:
699:
700:
701:
702:
703:
704:
705:
706:
707:
708:
709:
710:
711:
712:
713:
714:
715:
716:
717:
718:
719:
720:
721:
722:
723:
724:
725:
726:
727:
728:
729:
730:
731:
732:
733:
734:
735:
736:
737:
738:
739:
740:
741:
742:
743:
744:
745:
746:
747:
748:
749:
750:
751:
752:
753:
754:
755:
756:
757:
758:
759:
760:
761:
762:
763:
764:
765:
766:
767:
768:
769:
770:
771:
772:
773:
774:
775:
776:
777:
778:
779:
780:
781:
782:
783:
784:
785:
786:
787:
788:
789:
790:
791:
792:
793:
794:
795:
796:
797:
798:
799:
800:
801:
802:
803:
804:
805:
806:
807:
808:
809:
810:
811:
812:
813:
814:
815:
816:
817:
818:
819:
820:
821:
822:
823:
824:
825:
826:
827:
828:
829:
830:
831:
832:
833:
834:
835:
836:
837:
838:
839:
840:
841:
842:
843:
844:
845:
846:
847:
848:
849:
850:
851:
852:
853:
854:
855:
856:
857:
858:
859:
860:
861:
862:
863:
864:
865:
866:
867:
868:
869:
870:
871:
872:
873:
874:
875:
876:
877:
878:
879:
880:
881:
882:
883:
884:
885:
886:
887:
888:
889:
890:
891:
892:
893:
894:
895:
896:
897:
898:
899:
900:
901:
902:
903:
904:
905:
906:
907:
908:
909:
910:
911:
912:
913:
914:
915:
916:
917:
918:
919:
920:
921:
922:
923:
924:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-07-20 at 11:20:52ID24585006
Tags

ASP

,

SQL Server 2000

,

Forms

Topics

Active Server Pages (ASP)

,

MS SQL Server

,

Web Languages/Standards

,

Miscellaneous Web Development

Participating Experts
2
Points
500
Comments
37

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. MSAccess and Barcodes
    How can I display a field of numbers as a barcode in my database report?
  2. Barcodes using VB?
    can i prototype a barcode using VB? is it possible to draw the lines? wat other ways can i use to create the barcode?
  3. rm to ....
    Is(are) there any program(s) that can change the format from *.rm to *.asf, *.mpg, *.avi or *.dat ? Csn it handle big files like 100 MG ?
  4. Barcode
    Dear Experts, I need your help on printing barcode. I need to develop a system which able to print 1D and 2D barcode. May I know where have these reference? Kindly provide me the URLs and the sample codes, if possible. Thansk.
  5. DataMatrix Barcode
    I am trying to implement this barcode symbology. Anyone knows where I can get materials necessary? I am looking for the source code for an example implementation.

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: SamuelClemmonsPosted on 2009-07-20 at 17:23:58ID: 24900341

The simple issue here is that I can't get the first form to pass the values to the second form. Maybe this is the better way to state the problem. Can anyone please take a look that this problem

 

by: rcmbPosted on 2009-07-20 at 19:52:09ID: 24901045

try changing the method on the first form to post instead of get so you are passing the data to the second form.

 

by: SamuelClemmonsPosted on 2009-07-21 at 10:01:48ID: 24906845

Just got into work will try that now. Thanks

 

by: SamuelClemmonsPosted on 2009-07-21 at 10:23:26ID: 24907089

I changed the method on line 485 to post and I got an error citing line 148. I don't understand the nature of the error assoicated with this line. The error was " Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record."

Is that the "Get" method you were suggesting that I change on that page?

 

by: rcmbPosted on 2009-07-21 at 13:03:17ID: 24908734

What is happening now is you are actually getting the database query to run but you are not passing the correct information to the query.

Your query is UPDATE " & WA_table & " SET " & updateParamsObj(3) & " WHERE " & WhereObj & "

WhereObj = WA_AB_generateWhereClause(WA_where_fieldNames, WA_where_columns, WA_where_fieldValues, WA_where_comparisions)

Not sure what you are doing with the function WA_AB_generateWhereClause but I assume you are building your where statement.

I would write out the SQL query to see what is actually being passed and then go from there.

Curtis

 

by: SamuelClemmonsPosted on 2009-07-21 at 16:45:58ID: 24910420

Curtis,

I am going to start this over. I've changed too much code. I have another application on a different computer that was the same as this and it works at least until I try to change it to read from the view instead if the database.

This problem came up when I had to change the database that the page was looking at to a view that was made in SQL Server 2000.

The database name was: tbl_RM_Materials which was in the page tbl_RM_Materials_Results.asp

The view is RMaterial_RM_Materials and I need to select from this view instead of the database and have the data render in the page "tbl_RM_Materials_Results.asp".

The view selects from two databases and selects the most recent record assoicated with a particular barcode.

Next the data has to be sent from page "tbl_RM_Materials_Results.asp" to page "tbl_RM_Materials_Update.asp" where it will be updated and sent back to "tbl_RM_Materials_Results.asp"  and back to the database tbl_RM_Materials.


The two pages work just fine except now I have to use the view and I can't get it to work. I've attached the working pages


First page:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/veneermove.asp" -->
<!--#include file="WA_DataAssist/WA_AppBuilder_VB.asp" -->
<%
If Session("dbotbl_RM_Materials_Results_QueryString") <> "" AND Request.ServerVariables("QUERY_STRING") = "" Then
Response.Redirect("tbl_RM_Materials_Results.asp?" & Session("dbotbl_RM_Materials_Results_QueryString"))
Else
Session("dbotbl_RM_Materials_Results_QueryString") = Request.QueryString
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_BCODE
WADAdbotbl_RM_Materials__ParamRM_BCODE = "-1"
If (cStr(Request("S_RM_BCODE")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_BCODE = cStr(Request("S_RM_BCODE"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_DateTime
WADAdbotbl_RM_Materials__ParamRM_DateTime = "1/1/1"
If (cStr(Request("S_RM_DateTime")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_DateTime = cStr(Request("S_RM_DateTime"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_PurchOrd
WADAdbotbl_RM_Materials__ParamRM_PurchOrd = "-1"
If (cStr(Request("S_RM_PurchOrd")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_PurchOrd = cStr(Request("S_RM_PurchOrd"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Location
WADAdbotbl_RM_Materials__ParamRM_Location = "-1"
If (cStr(Request("S_RM_Location")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Location = cStr(Request("S_RM_Location"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Supplier
WADAdbotbl_RM_Materials__ParamRM_Supplier = "-1"
If (cStr(Request("S_RM_Supplier")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Supplier = cStr(Request("S_RM_Supplier"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Grade
WADAdbotbl_RM_Materials__ParamRM_Grade = "-1"
If (cStr(Request("S_RM_Grade")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Grade = cStr(Request("S_RM_Grade"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Thickness
WADAdbotbl_RM_Materials__ParamRM_Thickness = "-1"
If (cStr(Request("S_RM_Thickness")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Thickness = cStr(Request("S_RM_Thickness"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Quantity
WADAdbotbl_RM_Materials__ParamRM_Quantity = "-1"
If (cStr(Request("S_RM_Quantity")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Quantity = cStr(Request("S_RM_Quantity"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Status
WADAdbotbl_RM_Materials__ParamRM_Status = "-1"
If (cStr(Request("S_RM_Status")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Status = cStr(Request("S_RM_Status"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Product
WADAdbotbl_RM_Materials__ParamRM_Product = "-1"
If (cStr(Request("S_RM_Product")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Product = cStr(Request("S_RM_Product"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials
Dim WADAdbotbl_RM_Materials_numRows
 
Set WADAdbotbl_RM_Materials = Server.CreateObject("ADODB.Recordset")
WADAdbotbl_RM_Materials.ActiveConnection = MM_veneermove_STRING
WADAdbotbl_RM_Materials.Source = "SELECT * FROM dbo.tbl_RM_Materials  WHERE (RM_BCODE LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "') AND (RM_DateTime = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "' OR '1/1/1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "') AND (RM_PurchOrd LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "') AND (RM_Location LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "') AND (RM_Supplier LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "') AND (RM_Grade LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "') AND (RM_Thickness LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "') AND (RM_Quantity LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "') AND (RM_Status LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "') AND (RM_Product LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "') ORDER BY RM_DateTime DESC"
WADAdbotbl_RM_Materials.CursorType = 0
WADAdbotbl_RM_Materials.CursorLocation = 2
WADAdbotbl_RM_Materials.LockType = 1
WADAdbotbl_RM_Materials.Open()
 
WADAdbotbl_RM_Materials_numRows = 0
%>
<%
Dim WADAdbotbl_RM_Materials_1__numRows
Dim WADAdbotbl_RM_Materials_1__index
 
WADAdbotbl_RM_Materials_1__numRows = 1
WADAdbotbl_RM_Materials_1__index = 0
WADAdbotbl_RM_Materials_numRows = WADAdbotbl_RM_Materials_numRows + WADAdbotbl_RM_Materials_1__numRows
%>
<%
'  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
 
Dim WADAdbotbl_RM_Materials_total
Dim WADAdbotbl_RM_Materials_first
Dim WADAdbotbl_RM_Materials_last
 
' set the record count
WADAdbotbl_RM_Materials_total = WADAdbotbl_RM_Materials.RecordCount
 
' set the number of rows displayed on this page
If (WADAdbotbl_RM_Materials_numRows < 0) Then
  WADAdbotbl_RM_Materials_numRows = WADAdbotbl_RM_Materials_total
Elseif (WADAdbotbl_RM_Materials_numRows = 0) Then
  WADAdbotbl_RM_Materials_numRows = 1
End If
 
' set the first and last displayed record
WADAdbotbl_RM_Materials_first = 1
WADAdbotbl_RM_Materials_last  = WADAdbotbl_RM_Materials_first + WADAdbotbl_RM_Materials_numRows - 1
 
' if we have the correct record count, check the other stats
If (WADAdbotbl_RM_Materials_total <> -1) Then
  If (WADAdbotbl_RM_Materials_first > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_first = WADAdbotbl_RM_Materials_total
  End If
  If (WADAdbotbl_RM_Materials_last > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_last = WADAdbotbl_RM_Materials_total
  End If
  If (WADAdbotbl_RM_Materials_numRows > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_numRows = WADAdbotbl_RM_Materials_total
  End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
 
If (WADAdbotbl_RM_Materials_total = -1) Then
 
  ' count the total records by iterating through the recordset
  WADAdbotbl_RM_Materials_total=0
  While (Not WADAdbotbl_RM_Materials.EOF)
    WADAdbotbl_RM_Materials_total = WADAdbotbl_RM_Materials_total + 1
    WADAdbotbl_RM_Materials.MoveNext
  Wend
 
  ' reset the cursor to the beginning
  If (WADAdbotbl_RM_Materials.CursorType > 0) Then
    WADAdbotbl_RM_Materials.MoveFirst
  Else
    WADAdbotbl_RM_Materials.Requery
  End If
 
  ' set the number of rows displayed on this page
  If (WADAdbotbl_RM_Materials_numRows < 0 Or WADAdbotbl_RM_Materials_numRows > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_numRows = WADAdbotbl_RM_Materials_total
  End If
 
  ' set the first and last displayed record
  WADAdbotbl_RM_Materials_first = 1
  WADAdbotbl_RM_Materials_last = WADAdbotbl_RM_Materials_first + WADAdbotbl_RM_Materials_numRows - 1
  
  If (WADAdbotbl_RM_Materials_first > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_first = WADAdbotbl_RM_Materials_total
  End If
  If (WADAdbotbl_RM_Materials_last > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_last = WADAdbotbl_RM_Materials_total
  End If
 
End If
%>
<%
Dim MM_paramName 
%>
<%
' *** Move To Record and Go To Record: declare variables
 
Dim MM_rs
Dim MM_rsCount
Dim MM_size
Dim MM_uniqueCol
Dim MM_offset
Dim MM_atTotal
Dim MM_paramIsDefined
 
Dim MM_param
Dim MM_index
 
Set MM_rs    = WADAdbotbl_RM_Materials
MM_rsCount   = WADAdbotbl_RM_Materials_total
MM_size      = WADAdbotbl_RM_Materials_numRows
MM_uniqueCol = ""
MM_paramName = ""
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName <> "") Then
  MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
End If
%>
<%
' *** Move To Record: handle 'index' or 'offset' parameter
 
if (Not MM_paramIsDefined And MM_rsCount <> 0) then
 
  ' use index parameter if defined, otherwise use offset parameter
  MM_param = Request.QueryString("index")
  If (MM_param = "") Then
    MM_param = Request.QueryString("offset")
  End If
  If (MM_param <> "") Then
    MM_offset = Int(MM_param)
  End If
 
  ' if we have a record count, check if we are past the end of the recordset
  If (MM_rsCount <> -1) Then
    If (MM_offset >= MM_rsCount Or MM_offset = -1) Then  ' past end or move last
      If ((MM_rsCount Mod MM_size) > 0) Then         ' last page not a full repeat region
        MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
      Else
        MM_offset = MM_rsCount - MM_size
      End If
    End If
  End If
 
  ' move the cursor to the selected record
  MM_index = 0
  While ((Not MM_rs.EOF) And (MM_index < MM_offset Or MM_offset = -1))
    MM_rs.MoveNext
    MM_index = MM_index + 1
  Wend
  If (MM_rs.EOF) Then 
    MM_offset = MM_index  ' set MM_offset to the last possible record
  End If
 
End If
%>
<%
' *** Move To Record: if we dont know the record count, check the display range
 
If (MM_rsCount = -1) Then
 
  ' walk to the end of the display range for this page
  MM_index = MM_offset
  While (Not MM_rs.EOF And (MM_size < 0 Or MM_index < MM_offset + MM_size))
    MM_rs.MoveNext
    MM_index = MM_index + 1
  Wend
 
  ' if we walked off the end of the recordset, set MM_rsCount and MM_size
  If (MM_rs.EOF) Then
    MM_rsCount = MM_index
    If (MM_size < 0 Or MM_size > MM_rsCount) Then
      MM_size = MM_rsCount
    End If
  End If
 
  ' if we walked off the end, set the offset based on page size
  If (MM_rs.EOF And Not MM_paramIsDefined) Then
    If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
      If ((MM_rsCount Mod MM_size) > 0) Then
        MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
      Else
        MM_offset = MM_rsCount - MM_size
      End If
    End If
  End If
 
  ' reset the cursor to the beginning
  If (MM_rs.CursorType > 0) Then
    MM_rs.MoveFirst
  Else
    MM_rs.Requery
  End If
 
  ' move the cursor to the selected record
  MM_index = 0
  While (Not MM_rs.EOF And MM_index < MM_offset)
    MM_rs.MoveNext
    MM_index = MM_index + 1
  Wend
End If
%>
<%
' *** Move To Record: update recordset stats
 
' set the first and last displayed record
WADAdbotbl_RM_Materials_first = MM_offset + 1
WADAdbotbl_RM_Materials_last  = MM_offset + MM_size
 
If (MM_rsCount <> -1) Then
  If (WADAdbotbl_RM_Materials_first > MM_rsCount) Then
    WADAdbotbl_RM_Materials_first = MM_rsCount
  End If
  If (WADAdbotbl_RM_Materials_last > MM_rsCount) Then
    WADAdbotbl_RM_Materials_last = MM_rsCount
  End If
End If
 
' set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
 
Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth
 
Dim MM_removeList
Dim MM_item
Dim MM_nextItem
 
' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
  MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If
 
MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""
 
' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
  End If
Next
 
' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
  End If
Next
 
' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then 
  MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "")  Then
  MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
  MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If
 
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>
<%
' *** Move To Record: set the strings for the first, last, next, and previous links
 
Dim MM_keepMove
Dim MM_moveParam
Dim MM_moveFirst
Dim MM_moveLast
Dim MM_moveNext
Dim MM_movePrev
 
Dim MM_urlStr
Dim MM_paramList
Dim MM_paramIndex
Dim MM_nextParam
 
MM_keepMove = MM_keepBoth
MM_moveParam = "index"
 
' if the page has a repeated region, remove 'offset' from the maintained parameters
If (MM_size > 1) Then
  MM_moveParam = "offset"
  If (MM_keepMove <> "") Then
    MM_paramList = Split(MM_keepMove, "&")
    MM_keepMove = ""
    For MM_paramIndex = 0 To UBound(MM_paramList)
      MM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=") - 1)
      If (StrComp(MM_nextParam,MM_moveParam,1) <> 0) Then
        MM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex)
      End If
    Next
    If (MM_keepMove <> "") Then
      MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
    End If
  End If
End If
 
' set the strings for the move to links
If (MM_keepMove <> "") Then 
  MM_keepMove = Server.HTMLEncode(MM_keepMove) & "&"
End If
 
MM_urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="
 
MM_moveFirst = MM_urlStr & "0"
MM_moveLast  = MM_urlStr & "-1"
MM_moveNext  = MM_urlStr & CStr(MM_offset + MM_size)
If (MM_offset - MM_size < 0) Then
  MM_movePrev = MM_urlStr & "0"
Else
  MM_movePrev = MM_urlStr & CStr(MM_offset - MM_size)
End If
%>
<%
'WA AltClass Iterator
class WA_AltClassIterator
  public ClassArray
  public ClassCounter
end class
 
function WA_AltClassIterator_getClass(loopObj, incrementClass) 
  if (UBound(loopObj.ClassArray) = 0) then
    WA_AltClassIterator_getClass = ""
    exit function
  end if
  if (incrementClass) then
    if (loopObj.ClassCounter > UBound(loopObj.ClassArray)) then
      loopObj.ClassCounter = 0
    end if
    loopObj.ClassCounter = loopObj.ClassCounter + 1
  end if
  if (loopObj.ClassCounter > 0) then
    WA_AltClassIterator_getClass = loopObj.ClassArray(loopObj.ClassCounter-1)
  else
    WA_AltClassIterator_getClass = loopObj.ClassArray(0)
  end if
end function
%>
<%
'WA Alternating Class
Dim WARRT_AltClass1
Set WARRT_AltClass1 = new WA_AltClassIterator
WARRT_AltClass1.ClassCounter = 0
WARRT_AltClass1.ClassArray = Split("WADAResultsRowDark|", "|")
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Results tbl_RM_Materials</title>
<link href="WA_DataAssist/styles/Modular_Pacifica.css" rel="stylesheet" type="text/css" />
<link href="WA_DataAssist/styles/Arial.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background-color: #95CAFF;
}
.style1 {font-size: 14px}
a:link {
	color: #1E23F9;
}
a:visited {
	color: #D80FDC;
}
a:hover {
	color: #000000;
}
a:active {
	color: #FF0000;
}
-->
</style></head>
 
<body>
 
<body onload="document.forms['WADASearchForm'].S_RM_BCODE.focus();">
 
<div class="WADASearchContainer">
  <form action="tbl_RM_Materials_Results.asp" method="get" name="WADASearchForm" id="WADASearchForm">
    <div class="WADAHeader style1">SCAN BAR CODE TO RETREIVE FROM FLOOR INVENTORY</div>
    <table class="WADADataTable" cellpadding="0" cellspacing="0" border="0">
      <tr>
        <th class="WADADataTableHeader"><div align="left">BCODE:</div></th>
        <td class="WADADataTableCell"><input type="text" name="S_RM_BCODE" id="S_RM_BCODE" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_DateTime" id="S_RM_DateTime" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_PurchOrd" id="S_RM_PurchOrd" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Location" id="S_RM_Location" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Supplier" id="S_RM_Supplier" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Grade" id="S_RM_Grade" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Thickness" id="S_RM_Thickness" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Quantity" id="S_RM_Quantity" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Status" id="S_RM_Status" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Product" id="S_RM_Product" value="" size="20" /></td>
      </tr>
    </table>
    <table width="620" border="0" align="right">
      <tr>
        <td>  <% If Not WADAdbotbl_RM_Materials.EOF Or Not WADAdbotbl_RM_Materials.BOF Then %>
  <div class="WADAResults">
    <div class="WADAResultsNavigation">
      <div class="WADAResultsCount">Records <%=(WADAdbotbl_RM_Materials_first)%> to <%=(WADAdbotbl_RM_Materials_last)%> of <%=(WADAdbotbl_RM_Materials_total)%></div>
      <div class="WADAResultsNavTop">
        <table border="0" cellpadding="0" cellspacing="0" class="WADAResultsNavTable">
          <tr valign="middle">
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If MM_offset <> 0 Then %><a href="<%=MM_moveFirst%>" ><img src="WA_DataAssist/images/Pacifica/Modular_firsttxt.gif" alt="First" name="First" width="56" height="17" border="0" id="First" /></a>
                  <% End If ' end MM_offset <> 0 %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If MM_offset <> 0 Then %><a href="<%=MM_movePrev%>" ><img src="WA_DataAssist/images/Pacifica/Modular_previoustxt.gif" alt="Previous" name="Previous" width="56" height="17" border="0" id="Previous" /></a>
                  <% End If ' end MM_offset <> 0 %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If Not MM_atTotal Then %><a href="<%=MM_moveNext%>" ><img src="WA_DataAssist/images/Pacifica/Modular_nexttxt.gif" alt="Next" name="Next" width="56" height="17" border="0" id="Next" /></a>
                  <% End If ' end Not MM_atTotal %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If Not MM_atTotal Then %><a href="<%=MM_moveLast%>" ><img src="WA_DataAssist/images/Pacifica/Modular_lasttxt.gif" alt="Last" name="Last" width="56" height="17" border="0" id="Last" /></a>
                  <% End If ' end Not MM_atTotal %></td>
          </tr>
        </table>
      </div>
      <div class="WADAResultsInsertButton">  </div>
    </div>
    <table class="WADAResultsTable" border="1" cellpadding="1" cellspacing="1">
      <% 
While ((WADAdbotbl_RM_Materials_1__numRows <> 0) AND (NOT WADAdbotbl_RM_Materials.EOF)) 
%>
      <tr class="<%=WA_AltClassIterator_getClass(WARRT_AltClass1,true)%>">
	  	<tr>
	    <th class="WADAResultsTableHeader">BCODE:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_BCODE").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Date Time:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_DateTime").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Purchase Order:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_PurchOrd").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Location:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Location").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Supplier:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Supplier").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Grade:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Grade").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Thickness:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Thickness").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Quantity:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Quantity").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Status:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Status").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Product:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Product").Value)%></td>
		</tr>
		<th></th>
        <td class="WADAResultsEditButtons" nowrap="nowrap"><table class="WADAEditButton_Table">
            <tr>
              <td></td>
              <td><a href="tbl_RM_Materials_Update.asp?RM_ID=<%=Server.URLEncode((WADAdbotbl_RM_Materials.Fields.Item("RM_ID").Value))%>"><img src="WA_DataAssist/images/Pacifica/Modular_update.gif" alt="Update" name="Update" width="56" height="17" border="0" id="Update" /></a></td>
              <td></td>
            </tr>
        </table></td>
      </tr>
      <% 
  WADAdbotbl_RM_Materials_1__index=WADAdbotbl_RM_Materials_1__index+1
  WADAdbotbl_RM_Materials_1__numRows=WADAdbotbl_RM_Materials_1__numRows-1
  WADAdbotbl_RM_Materials.MoveNext()
Wend
%>
    </table>
    <div class="WADAResultsNavigation">
      <div class="WADAResultsCount">Records <%=(WADAdbotbl_RM_Materials_first)%> to <%=(WADAdbotbl_RM_Materials_last)%> of <%=(WADAdbotbl_RM_Materials_total)%></div>
      <div class="WADAResultsNavBottom">
        <table border="0" cellpadding="0" cellspacing="0" class="WADAResultsNavTable">
          <tr valign="middle">
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If MM_offset <> 0 Then %><a href="<%=MM_moveFirst%>" ><img src="WA_DataAssist/images/Pacifica/Modular_firsttxt.gif" alt="First" name="First" width="56" height="17" border="0" id="First" /></a>
                  <% End If ' end MM_offset <> 0 %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If MM_offset <> 0 Then %><a href="<%=MM_movePrev%>" ><img src="WA_DataAssist/images/Pacifica/Modular_previoustxt.gif" alt="Previous" name="Previous" width="56" height="17" border="0" id="Previous" /></a>
                  <% End If ' end MM_offset <> 0 %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If Not MM_atTotal Then %><a href="<%=MM_moveNext%>" ><img src="WA_DataAssist/images/Pacifica/Modular_nexttxt.gif" alt="Next" name="Next" width="56" height="17" border="0" id="Next" /></a>
                  <% End If ' end Not MM_atTotal %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If Not MM_atTotal Then %><a href="<%=MM_moveLast%>" ><img src="WA_DataAssist/images/Pacifica/Modular_lasttxt.gif" alt="Last" name="Last" width="56" height="17" border="0" id="Last" /></a>
                  <% End If ' end Not MM_atTotal %></td>
          </tr>
        </table>
      </div>
    </div>
  </div>
  <% End If ' end Not WADAdbotbl_RM_Materials.EOF Or NOT WADAdbotbl_RM_Materials.BOF %> <% If WADAdbotbl_RM_Materials.EOF And WADAdbotbl_RM_Materials.BOF Then %>
  <div class="WADANoResults">
    <div class="WADANoResultsMessage">No results for your search</div>
    <div> <a href="tbl_RM_Materials_Insert_Scarf.asp"><img border="0" name="Insert" id="Insert" alt="Insert" src="WA_DataAssist/images/Pacifica/Modular_insert.gif" /></a> </div>
  </div>
<% End If ' end WADAdbotbl_RM_Materials.EOF And WADAdbotbl_RM_Materials.BOF %> 
</td>
      </tr>
    </table>
    <div class="WADAButtonRow">
      <table class="WADADataNavButtons" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td class="WADADataNavButtonCell" nowrap="nowrap"><input name="Search" type="image" id="Search" value="Search" src="WA_DataAssist/images/Pacifica/Modular_search.gif" alt="Search" width="56" height="17" hspace="0" vspace="0" border="0"  /></td>
        </tr>
      </table>
    </div>
  </form>
</div>
<div class="WADAResultsContainer">
  <div class="WADAResultsHeader">
    <div class="WADAHeaderText">
	
  
  <form name="form3" method="post" action="http://localhost/pwc167/tbl_RM_Materials_Insert_Scarf.asp">
    <input type="submit" name="Submit" value="Raw Materials">
  </form>
  <p>PRESS UPDATE TO CHANGE LOCATION OR MAKE CORRECTIONS</p>
  <p><a href="FloorMov_Instruc.htm" class="WADAHeaderText">Page Instructions</a> </p>
    </div>
  </div>
</body>
</html>
<%
WADAdbotbl_RM_Materials.Close()
Set WADAdbotbl_RM_Materials = Nothing
%>
 
 
 
_____________________________________________________________________
 
Second page:
 
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/veneermove.asp" -->
<!--#include file="WA_DataAssist/WA_AppBuilder_VB.asp" -->
<%
Dim WADAdbotbl_RM_Materials__ParamRM_ID
WADAdbotbl_RM_Materials__ParamRM_ID = "-1"
If (Request.QueryString("RM_ID") <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_ID = Request.QueryString("RM_ID")
End If
%>
<%
Dim WADAdbotbl_RM_Materials
Dim WADAdbotbl_RM_Materials_numRows
 
Set WADAdbotbl_RM_Materials = Server.CreateObject("ADODB.Recordset")
WADAdbotbl_RM_Materials.ActiveConnection = MM_veneermove_STRING
WADAdbotbl_RM_Materials.Source = "SELECT * FROM dbo.tbl_RM_Materials WHERE RM_ID = " + Replace(WADAdbotbl_RM_Materials__ParamRM_ID, "'", "''") + ""
WADAdbotbl_RM_Materials.CursorType = 0
WADAdbotbl_RM_Materials.CursorLocation = 2
WADAdbotbl_RM_Materials.LockType = 1
WADAdbotbl_RM_Materials.Open()
 
WADAdbotbl_RM_Materials_numRows = 0
%>
<%
Dim rs_Location
Dim rs_Location_numRows
 
Set rs_Location = Server.CreateObject("ADODB.Recordset")
rs_Location.ActiveConnection = MM_veneermove_STRING
rs_Location.Source = "SELECT LocationNum FROM dbo.tbl_location ORDER BY LocationNum ASC"
rs_Location.CursorType = 0
rs_Location.CursorLocation = 2
rs_Location.LockType = 1
rs_Location.Open()
 
rs_Location_numRows = 0
%>
<%
Dim rs_Status
Dim rs_Status_numRows
 
Set rs_Status = Server.CreateObject("ADODB.Recordset")
rs_Status.ActiveConnection = MM_veneermove_STRING
rs_Status.Source = "SELECT status FROM dbo.tbl_status ORDER BY status_ID ASC"
rs_Status.CursorType = 0
rs_Status.CursorLocation = 2
rs_Status.LockType = 1
rs_Status.Open()
 
rs_Status_numRows = 0
%>
<%
' WA Application Builder Update
if (cStr(Request.Form("Update.x")) <> "")  then
  WA_connection = MM_veneermove_STRING
  WA_table = "dbo.tbl_RM_Materials"
  WA_redirectURL = "tbl_RM_Materials_Results.asp"
  WA_keepQueryString = false
  WA_indexField = "RM_ID"
  WA_fieldNamesStr = "RM_BCODE|RM_DateTime|RM_PurchOrd|RM_Location|RM_Supplier|RM_Grade|RM_Thickness|RM_Quantity|RM_Status|RM_Product"
  WA_fieldValuesStr = "" & cStr(cStr(Request.Form("RM_BCODE"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_DateTime"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_PurchOrd"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Location"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Supplier"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Grade"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Thickness"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Quantity"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Status"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Product"))) & ""
  WA_columnTypesStr = "',none,''|',none,NULL|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''"
  WA_comparisonStr = " LIKE | = | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE "
  WA_fieldNames = Split(WA_fieldNamesStr,"|")
  WA_fieldValues = Split(WA_fieldValuesStr,"|")
  WA_columns = Split(WA_columnTypesStr,"|")
  WA_comparisions = Split(WA_comparisonStr, "|")
 
  WA_where_fieldValuesStr = "" & cStr(cStr(Request.Form("WADAUpdateRecordID"))) & ""
  WA_where_columnTypesStr = "none,none,NULL"
  WA_where_comparisonStr = "="
  WA_where_fieldNames = Split(WA_indexField,"|")
  WA_where_fieldValues = Split(WA_where_fieldValuesStr,"|")
  WA_where_columns = Split(WA_where_columnTypesStr,"|")
  WA_where_comparisions = Split(WA_where_comparisonStr, "|")
  
 
  updateParamsObj = WA_AB_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, -1)
  WhereObj = WA_AB_generateWhereClause(WA_where_fieldNames, WA_where_columns, WA_where_fieldValues, WA_where_comparisions)
  
  set MM_editCmd = Server.CreateObject("ADODB.Command")
  MM_editCmd.ActiveConnection = WA_connection
  MM_editCmd.CommandText = "UPDATE " & WA_table & " SET " & updateParamsObj(3) & " WHERE " & WhereObj & ""
  MM_editCmd.Execute()
  MM_editCmd.ActiveConnection.Close()
  if (WA_redirectURL <> "")  then
    if (WA_keepQueryString AND Request.QueryString <> "" AND Request.QueryString.Count > 0) then
      if (inStr(WA_redirectURL,"?") > 0)  then
	    WA_redirectURL = WA_redirectURL & "&"
      else
	    WA_redirectURL = WA_redirectURL & "?"
	  end if
      WA_redirectURL = WA_redirectURL & Request.QueryString
    end if
    Response.Redirect(WA_redirectURL)
  end if
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Update tbl_RM_Materials</title>
<link href="WA_DataAssist/styles/Modular_Poppy.css" rel="stylesheet" type="text/css" />
<link href="WA_DataAssist/styles/Arial.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background-color: #FFE8E8;
}
.style1 {color: #FF0000}
.style2 {font-size: 16}
.style11 {color: #FF0000; font-size: 16px; }
.style14 {font-size: 18px}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
 
<body onload="document.forms['WADAUpdateForm'].RM_Location.focus();">
<body>
 
<div id="Layer1" style="position:absolute; left:400px; top:200px; width:479px; height:56px; z-index:1"> 
  <p class="WADAHeaderText style14">To update the record choose new &quot;Location&quot; &amp; &quot;Status&quot;.</p>
  <p class="WADAHeaderText style2"><span class="style11"><span class="style14">To leave the record unchanged click &quot;Cancel&quot;</span>.</span> </p>
</div>
<div id="Layer2" style="position:absolute; left:308px; top:119px; width:171px; height:22px; z-index:2"><em><strong><span class="style1">RESET &quot;LOCATION!&quot;</span></strong></em></div>
<div id="Layer3" style="position:absolute; left:311px; top:288px; width:160px; height:25px; z-index:3" class="style1"><em><strong>RESET &quot;STATUS!&quot;</strong></em></div>
<div class="WADAUpdateContainer"> 
    <form action="tbl_RM_Materials_Update.asp" method="post" name="WADAUpdateForm" id="WADAUpdateForm">
      <div class="WADAHeader">Update Record: Select new location  and press update. </div>
      <table class="WADADataTable" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <th class="WADADataTableHeader"><div align="left">BCODE:</div></th>
          <td class="WADADataTableCell"><input type="text" name="RM_BCODE" id="RM_BCODE" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_BCODE").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Date Time:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_DateTime" id="RM_DateTime" value="<%response.write( now())%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"></th>
          <td class="WADADataTableCell"><input type="Hidden" readonly name="RM_PurchOrd" id="RM_PurchOrd" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_PurchOrd").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Location:</div></th>
          <td class="WADADataTableCell">
            <select name="RM_Location">
              <%
While (NOT rs_Location.EOF)
%>
              <option value="<%=(rs_Location.Fields.Item("LocationNum").Value)%>"><%=(rs_Location.Fields.Item("LocationNum").Value)%></option>
              <%
  rs_Location.MoveNext()
Wend
If (rs_Location.CursorType > 0) Then
  rs_Location.MoveFirst
Else
  rs_Location.Requery
End If
%>
          </select></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Supplier:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Supplier" id="RM_Supplier" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Supplier").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Grade:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Grade" id="RM_Grade" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Grade").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Thickness:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Thickness" id="RM_Thickness" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Thickness").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Quantity:</div></th>
          <td class="WADADataTableCell"><input type="text" name="RM_Quantity" id="RM_Quantity" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Quantity").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Status:</div></th>
          <td class="WADADataTableCell"><select name="RM_Status">
            <%
While (NOT rs_Status.EOF)
%>
            <option value="<%=(rs_Status.Fields.Item("status").Value)%>"><%=(rs_Status.Fields.Item("status").Value)%></option>
            <%
  rs_Status.MoveNext()
Wend
If (rs_Status.CursorType > 0) Then
  rs_Status.MoveFirst
Else
  rs_Status.Requery
End If
%>
          </select></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left"></div></th>
          <td class="WADADataTableCell"><input type="Hidden" readonly name="RM_Product" id="RM_Product" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Product").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
      </table>
      <div class="WADAButtonRow">
        <table class="WADADataNavButtons" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td class="WADADataNavButtonCell" nowrap="nowrap"><input name="Update" type="image" id="Update" value="Update" src="WA_DataAssist/images/Poppy/Modular_update.gif" alt="Update" width="56" height="17" hspace="0" vspace="0" border="0"  /></td>
            <td class="WADADataNavButtonCell" nowrap="nowrap"><a href="tbl_RM_Materials_Results.asp"><img src="WA_DataAssist/images/Poppy/Modular_cancel.gif" alt="Cancel" name="Cancel" width="56" height="17" border="0" id="Cancel" /></a></td>
          </tr>
        </table>
        <input name="WADAUpdateRecordID" type="hidden" id="WADAUpdateRecordID" value="<%=Server.URLEncode((WADAdbotbl_RM_Materials.Fields.Item("RM_ID").Value))%>">
      </div>
       <% If WADAdbotbl_RM_Materials.EOF And WADAdbotbl_RM_Materials.BOF Then %>
      <div class="WADANoResults">
        <div class="WADANoResultsMessage">No record found.</div>
      </div>
      <% End If ' end WADAdbotbl_RM_Materials.EOF And WADAdbotbl_RM_Materials.BOF %>
    </form>
	  <p>  <table border="0">
    <tr>
      <td>  
	  	
  <form name="form2" method="post" action="http://localhost/tbl_RM_Materials_Results.asp">
    <input type="submit" name="Submit" value="Floor Inventory">
  </form>
  <form name="form3" method="post" action="http://localhost/tbl_RM_Materials_Insert_Scarf.asp">
    <input type="submit" name="Submit" value="Raw Materials Page">
  </form>
</td>
    </tr>
  </table>
&nbsp;</p>
 
</div>
</body>
</html>
<%
WADAdbotbl_RM_Materials.Close()
Set WADAdbotbl_RM_Materials = Nothing
%>
<%
rs_Location.Close()
Set rs_Location = Nothing
%>
<%
rs_Status.Close()
Set rs_Status = Nothing
%>
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
513:
514:
515:
516:
517:
518:
519:
520:
521:
522:
523:
524:
525:
526:
527:
528:
529:
530:
531:
532:
533:
534:
535:
536:
537:
538:
539:
540:
541:
542:
543:
544:
545:
546:
547:
548:
549:
550:
551:
552:
553:
554:
555:
556:
557:
558:
559:
560:
561:
562:
563:
564:
565:
566:
567:
568:
569:
570:
571:
572:
573:
574:
575:
576:
577:
578:
579:
580:
581:
582:
583:
584:
585:
586:
587:
588:
589:
590:
591:
592:
593:
594:
595:
596:
597:
598:
599:
600:
601:
602:
603:
604:
605:
606:
607:
608:
609:
610:
611:
612:
613:
614:
615:
616:
617:
618:
619:
620:
621:
622:
623:
624:
625:
626:
627:
628:
629:
630:
631:
632:
633:
634:
635:
636:
637:
638:
639:
640:
641:
642:
643:
644:
645:
646:
647:
648:
649:
650:
651:
652:
653:
654:
655:
656:
657:
658:
659:
660:
661:
662:
663:
664:
665:
666:
667:
668:
669:
670:
671:
672:
673:
674:
675:
676:
677:
678:
679:
680:
681:
682:
683:
684:
685:
686:
687:
688:
689:
690:
691:
692:
693:
694:
695:
696:
697:
698:
699:
700:
701:
702:
703:
704:
705:
706:
707:
708:
709:
710:
711:
712:
713:
714:
715:
716:
717:
718:
719:
720:
721:
722:
723:
724:
725:
726:
727:
728:
729:
730:
731:
732:
733:
734:
735:
736:
737:
738:
739:
740:
741:
742:
743:
744:
745:
746:
747:
748:
749:
750:
751:
752:
753:
754:
755:
756:
757:
758:
759:
760:
761:
762:
763:
764:
765:
766:
767:
768:
769:
770:
771:
772:
773:
774:
775:
776:
777:
778:
779:
780:
781:
782:
783:
784:
785:
786:
787:
788:
789:
790:
791:
792:
793:
794:
795:
796:
797:
798:
799:
800:
801:
802:
803:
804:
805:
806:
807:
808:
809:
810:
811:
812:
813:
814:
815:
816:
817:
818:
819:
820:
821:
822:
823:
824:
825:
826:
827:
828:
829:
830:
831:
832:
833:
834:
835:
836:
837:
838:
839:
840:
841:
842:
843:
844:
845:
846:
847:
848:
849:
850:
851:
852:
853:
854:
855:
856:
857:
858:
859:
860:
861:
862:
863:
864:
865:
866:
867:
868:
869:
870:
871:
872:
873:
874:
875:
876:
877:
878:
879:
880:
881:
882:
883:
884:
885:
886:
887:
888:
889:
890:
891:
892:
893:
894:
895:
896:
897:
898:
899:
900:
901:
902:
903:
904:
905:
906:
907:
908:
909:
910:
911:
912:
913:
914:
915:
916:
917:
918:
919:
920:
921:
922:
923:
924:
925:
926:
927:

Select allOpen in new window

 

by: rcmbPosted on 2009-07-21 at 18:26:42ID: 24910809

what error are you seeing? make sure you have friendly error messages turned off in ie so you can see the actual error and line number.

 

by: SamuelClemmonsPosted on 2009-07-21 at 18:37:39ID: 24910846

I do have friendly error turned on and I do get the line number. I've just made so many changes that I felt that starting over with pages that still work would be more productive.

I just need to figure out how to get the first page to use the view and pass those values off to the second page which will then return it back to the first page and submit it back to the database.

The first page is currently selecting from the table "tbl_RM_Materials" but needs to be changed to select from the view "RMaterial_RM_Materials" and pass those values to the second page which will update the record and return it to the first page and submit it back to the database "tbl_RM_Materials".

This seems like a simple thing to do. I don't see why I am having so much trouble.

Do you want to use the new pages or stick with the ones we've been using??

 

by: rcmbPosted on 2009-07-21 at 18:50:49ID: 24910912

a view is the same as a table when you are write the sql statement...simply change select * from tbl_RM_Materials to select * from RMaterial_RM_Materials

If you have the same fields selected in the view as the table has then you should be able to display the information the same way.

Anyway for me to see the pages in action...the code is helpful but I would like to see exactly what the outcome should be.

 

by: SamuelClemmonsPosted on 2009-07-22 at 10:29:35ID: 24917502

I did change the SQL statement in the page to select the view name and I am currently getting this error.


Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

/tbl_RM_Materials_Update.asp, line 240

The line will actually be 811 in the code I gave you.

This is the code where I changed the SQL select statement to select from the View. The page line number is "90" where this code is in the above example. It is not the new unchanged pages that I last submitted.
 
WADAdbotbl_RM_Materials.Source = "SELECT *  FROM dbo.RMaterial_RM_Materials  WHERE (RM_BCODE LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "') AND (RM_DateTime = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "' OR '1/1/1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "') AND (RM_PurchOrd LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "') AND (RM_Location LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "') AND (RM_Supplier LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "') AND (RM_Grade LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "') AND (RM_Thickness LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "') AND (RM_Quantity LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "') AND (RM_Status LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "') AND (RM_Product LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "')  ORDER BY RM_DateTime DESC"
                                              
1:
2:
3:

Select allOpen in new window

 

by: rcmbPosted on 2009-07-22 at 15:00:34ID: 24920079

Do a response.write for the sql query and post it. This will tell us exactly what sql is trying to do and why we are seeing the error.

 

by: rcmbPosted on 2009-07-22 at 15:02:59ID: 24920097

What are you trying to do with this:
'-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "')

 

by: SamuelClemmonsPosted on 2009-07-22 at 17:46:40ID: 24921008

I am not sure where to place the "response.write" in the code.

This code  ... '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "')... is part of what dreamweaver wrote and I am not sure what it is.

From what I have seen it seems to be part of a record set parameter for one of the values of the fields in the databases that is returned after a search / request.

 

by: rcmbPosted on 2009-07-22 at 17:55:38ID: 24921039



Where you have the line: WADAdbotbl_RM_Materials.Source = "SELECT *  FROM .....
Replace it with the three lines below. It will assign your query to the variable strSQL and then write it out.
strSQL = "SELECT *  FROM dbo.RMaterial_RM_Materials  WHERE (RM_BCODE LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "') AND (RM_DateTime = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "' OR '1/1/1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "') AND (RM_PurchOrd LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "') AND (RM_Location LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "') AND (RM_Supplier LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "') AND (RM_Grade LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "') AND (RM_Thickness LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "') AND (RM_Quantity LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "') AND (RM_Status LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "') AND (RM_Product LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "')  ORDER BY RM_DateTime DESC"
response.write strSQL
WADAdbotbl_RM_Materials.Source = "SELECT *  FROM dbo.RMaterial_RM_Materials  WHERE (RM_BCODE LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "') AND (RM_DateTime = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "' OR '1/1/1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "') AND (RM_PurchOrd LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "') AND (RM_Location LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "') AND (RM_Supplier LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "') AND (RM_Grade LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "') AND (RM_Thickness LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "') AND (RM_Quantity LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "') AND (RM_Status LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "') AND (RM_Product LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "')  ORDER BY RM_DateTime DESC"

 

by: SamuelClemmonsPosted on 2009-07-23 at 10:32:32ID: 24927779

rcmb,

I just tried your code and it's not working. It is failing on line 197. The failure wording is:

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

I have given you the page as it exists now. You can check if I put your code in correctly.

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/veneermove.asp" -->
<!--#include file="Connections/PWC125.asp" -->
<!--#include file="WA_DataAssist/WA_AppBuilder_VB.asp" -->
<%
Dim WADAdbotbl_RM_Materials__ParamRM_ID
WADAdbotbl_RM_Materials__ParamRM_ID = "-1"
If (Request.QueryString("RM_ID") <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_ID = Request.QueryString("RM_ID")
End If
%>
 
<!-- Begin new view record set code -->
 
<%
Dim WADAdboRMaterial_RM_Materials__ParamRM_ID
WADAdboRMaterial_RM_Materials__ParamRM_ID = "-1"
If (Request.QueryString("RM_ID") <> "") Then 
  WADAdboRMaterial_RM_Materials__ParamRM_ID = Request.QueryString("RM_ID")
End If
%>
<%
Dim WADAdbotbl_RM_Materials
Dim WADAdbotbl_RM_Materials_numRows
 
Set WADAdbotbl_RM_Materials = Server.CreateObject("ADODB.Recordset")
WADAdbotbl_RM_Materials.ActiveConnection = MM_veneermove_STRING
strSQL = "SELECT *  FROM dbo.RMaterial_RM_Materials  WHERE (RM_BCODE LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "') AND (RM_DateTime = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "' OR '1/1/1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "') AND (RM_PurchOrd LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "') AND (RM_Location LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "') AND (RM_Supplier LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "') AND (RM_Grade LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "') AND (RM_Thickness LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "') AND (RM_Quantity LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "') AND (RM_Status LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "') AND (RM_Product LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "')  ORDER BY RM_DateTime DESC"
response.write strSQL
WADAdbotbl_RM_Materials.Source = "SELECT *  FROM dbo.RMaterial_RM_Materials  WHERE (RM_BCODE LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "') AND (RM_DateTime = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "' OR '1/1/1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "') AND (RM_PurchOrd LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "') AND (RM_Location LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "') AND (RM_Supplier LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "') AND (RM_Grade LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "') AND (RM_Thickness LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "') AND (RM_Quantity LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "') AND (RM_Status LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "') AND (RM_Product LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "')  ORDER BY RM_DateTime DESC"
 
WADAdbotbl_RM_Materials.CursorType = 0
WADAdbotbl_RM_Materials.CursorLocation = 2
WADAdbotbl_RM_Materials.LockType = 1
WADAdbotbl_RM_Materials.Open()
 
WADAdbotbl_RM_Materials_numRows = 0
%>
<!-- Begin new view record set code -->
 
<%
Dim WADAdboRMaterial_RM_Materials
Dim WADAdboRMaterial_RM_Materials_numRows
 
Set WADAdboRMaterial_RM_Materials = Server.CreateObject("ADODB.Recordset")
WADAdboRMaterial_RM_Materials.ActiveConnection = MM_veneermove_STRING
WADAdboRMaterial_RM_Materials.Source = "SELECT * FROM dbo.tbl_RM_Materials WHERE RM_ID = " + Replace(WADAdboRMaterial_RM_Materials__ParamRM_ID, "'", "''") + ""
WADAdboRMaterial_RM_Materials.CursorType = 0
WADAdboRMaterial_RM_Materials.CursorLocation = 2
WADAdboRMaterial_RM_Materials.LockType = 1
WADAdboRMaterial_RM_Materials.Open()
 
WADAdboRMaterial_RM_Materials_numRows = 0
%>
 
 
 
 
<%
Dim rs_Location
Dim rs_Location_numRows
 
Set rs_Location = Server.CreateObject("ADODB.Recordset")
rs_Location.ActiveConnection = MM_veneermove_STRING
rs_Location.Source = "SELECT LocationNum FROM dbo.tbl_location ORDER BY LocationNum ASC"
rs_Location.CursorType = 0
rs_Location.CursorLocation = 2
rs_Location.LockType = 1
rs_Location.Open()
 
rs_Location_numRows = 0
%>
<%
Dim rs_Status
Dim rs_Status_numRows
 
Set rs_Status = Server.CreateObject("ADODB.Recordset")
rs_Status.ActiveConnection = MM_veneermove_STRING
rs_Status.Source = "SELECT status FROM dbo.tbl_status ORDER BY status_ID ASC"
rs_Status.CursorType = 0
rs_Status.CursorLocation = 2
rs_Status.LockType = 1
rs_Status.Open()
 
rs_Status_numRows = 0
%>
<%
Dim rs_RMaterial_RM_Materials_View
Dim rs_RMaterial_RM_Materials_View_numRows
 
Set rs_RMaterial_RM_Materials_View = Server.CreateObject("ADODB.Recordset")
rs_RMaterial_RM_Materials_View.ActiveConnection = MM_PWC125_STRING
rs_RMaterial_RM_Materials_View.Source = "SELECT * FROM dbo.RMaterial_RM_Materials"
rs_RMaterial_RM_Materials_View.CursorType = 0
rs_RMaterial_RM_Materials_View.CursorLocation = 2
rs_RMaterial_RM_Materials_View.LockType = 1
rs_RMaterial_RM_Materials_View.Open()
 
rs_RMaterial_RM_Materials_View_numRows = 0
%>
<%
' WA Application Builder Update
if (cStr(Request.Form("Update.x")) <> "")  then
  WA_connection = MM_veneermove_STRING
  WA_table = "dbo.tbl_RM_Materials"
  WA_redirectURL = "tbl_RM_Materials_Results.asp"
  WA_keepQueryString = false
  WA_indexField = "RM_ID"
  WA_fieldNamesStr = "RM_BCODE|RM_DateTime|RM_PurchOrd|RM_Location|RM_Supplier|RM_Grade|RM_Thickness|RM_Quantity|RM_Status|RM_Product"
  WA_fieldValuesStr = "" & cStr(cStr(Request.Form("RM_BCODE"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_DateTime"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_PurchOrd"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Location"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Supplier"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Grade"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Thickness"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Quantity"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Status"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Product"))) & ""
  WA_columnTypesStr = "',none,''|',none,NULL|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''"
  WA_comparisonStr = " LIKE | = | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE "
  WA_fieldNames = Split(WA_fieldNamesStr,"|")
  WA_fieldValues = Split(WA_fieldValuesStr,"|")
  WA_columns = Split(WA_columnTypesStr,"|")
  WA_comparisions = Split(WA_comparisonStr, "|")
 
  WA_where_fieldValuesStr = "" & cStr(cStr(Request.Form("WADAUpdateRecordID"))) & ""
  WA_where_columnTypesStr = "none,none,NULL"
  WA_where_comparisonStr = "="
  WA_where_fieldNames = Split(WA_indexField,"|")
  WA_where_fieldValues = Split(WA_where_fieldValuesStr,"|")
  WA_where_columns = Split(WA_where_columnTypesStr,"|")
  WA_where_comparisions = Split(WA_where_comparisonStr, "|")
  
 
  updateParamsObj = WA_AB_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, -1)
  WhereObj = WA_AB_generateWhereClause(WA_where_fieldNames, WA_where_columns, WA_where_fieldValues, WA_where_comparisions)
  
  set MM_editCmd = Server.CreateObject("ADODB.Command")
  MM_editCmd.ActiveConnection = WA_connection
  MM_editCmd.CommandText = "UPDATE " & WA_table & " SET " & updateParamsObj(3) & " WHERE " & WhereObj & ""
  MM_editCmd.Execute()
  MM_editCmd.ActiveConnection.Close()
  if (WA_redirectURL <> "")  then
    if (WA_keepQueryString AND Request.QueryString <> "" AND Request.QueryString.Count > 0) then
      if (inStr(WA_redirectURL,"?") > 0)  then
	    WA_redirectURL = WA_redirectURL & "&"
      else
	    WA_redirectURL = WA_redirectURL & "?"
	  end if
      WA_redirectURL = WA_redirectURL & Request.QueryString
    end if
    Response.Redirect(WA_redirectURL)
  end if
end if
%>
<%
WADAdboRMaterial_RM_Materials.Close()
Set WADAdboRMaterial_RM_Materials = Nothing
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Update tbl_RM_Materials</title>
<link href="WA_DataAssist/styles/Modular_Poppy.css" rel="stylesheet" type="text/css" />
<link href="WA_DataAssist/styles/Arial.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background-color: #FFE8E8;
}
.style1 {color: #FF0000}
.style2 {font-size: 16}
.style11 {color: #FF0000; font-size: 16px; }
.style14 {font-size: 18px}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
 
<body onload="document.forms['WADAUpdateForm'].RM_Location.focus();">
<body>
 
<div id="Layer1" style="position:absolute; left:400px; top:200px; width:479px; height:56px; z-index:1"> 
  <p class="WADAHeaderText style14">To update the record choose new &quot;Location&quot; &amp; &quot;Status&quot;.</p>
  <p class="WADAHeaderText style2"><span class="style11"><span class="style14">To leave the record unchanged click &quot;Cancel&quot;</span>.</span> </p>
</div>
<div id="Layer2" style="position:absolute; left:308px; top:119px; width:171px; height:22px; z-index:2"><em><strong><span class="style1">RESET &quot;LOCATION!&quot;</span></strong></em></div>
<div id="Layer3" style="position:absolute; left:311px; top:288px; width:160px; height:25px; z-index:3" class="style1"><em><strong>RESET &quot;STATUS!&quot;</strong></em></div>
<div class="WADAUpdateContainer"> 
    <form action="tbl_RM_Materials_Update.asp" method="post" name="WADAUpdateForm" id="WADAUpdateForm">
      <div class="WADAHeader">Update Record: Select new location  and press update. </div>
      <table class="WADADataTable" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <th class="WADADataTableHeader"><div align="left">BCODE:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_BCODE" id="RM_BCODE" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_BCODE").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Date Time:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_DateTime" id="RM_DateTime" value="<%response.write( now())%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"></th>
          <td class="WADADataTableCell"><input type="Hidden" readonly name="RM_PurchOrd" id="RM_PurchOrd" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_PurchOrd").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Location:</div></th>
          <td class="WADADataTableCell">
            <select name="RM_Location">
              <%
While (NOT rs_Location.EOF)
%>
              <option value="<%=(rs_Location.Fields.Item("LocationNum").Value)%>"><%=(rs_Location.Fields.Item("LocationNum").Value)%></option>
              <%
  rs_Location.MoveNext()
Wend
If (rs_Location.CursorType > 0) Then
  rs_Location.MoveFirst
Else
  rs_Location.Requery
End If
%>
          </select></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Supplier:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Supplier" id="RM_Supplier" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Supplier").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Grade:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Grade" id="RM_Grade" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Grade").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Thickness:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Thickness" id="RM_Thickness" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Thickness").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Quantity:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Quantity" id="RM_Quantity" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Quantity").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Status:</div></th>
          <td class="WADADataTableCell"><select name="RM_Status">
            <%
While (NOT rs_Status.EOF)
%>
            <option value="<%=(rs_Status.Fields.Item("status").Value)%>"><%=(rs_Status.Fields.Item("status").Value)%></option>
            <%
  rs_Status.MoveNext()
Wend
If (rs_Status.CursorType > 0) Then
  rs_Status.MoveFirst
Else
  rs_Status.Requery
End If
%>
          </select></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left"></div></th>
          <td class="WADADataTableCell"><input type="Hidden" readonly name="RM_Product" id="RM_Product" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Product").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
      </table>
      <div class="WADAButtonRow">
        <table class="WADADataNavButtons" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td class="WADADataNavButtonCell" nowrap="nowrap"><input name="Update" type="image" id="Update" value="Update" src="WA_DataAssist/images/Poppy/Modular_update.gif" alt="Update" width="56" height="17" hspace="0" vspace="0" border="0"  /></td>
            <td class="WADADataNavButtonCell" nowrap="nowrap"><a href="tbl_RM_Materials_Results.asp"><img src="WA_DataAssist/images/Poppy/Modular_cancel.gif" alt="Cancel" name="Cancel" width="56" height="17" border="0" id="Cancel" /></a></td>
          </tr>
        </table>
        <input name="WADAUpdateRecordID" type="hidden" id="WADAUpdateRecordID" value="<%=Server.URLEncode((WADAdbotbl_RM_Materials.Fields.Item("RM_ID").Value))%>">
      </div>
       <% If WADAdbotbl_RM_Materials.EOF And WADAdbotbl_RM_Materials.BOF Then %>
      <div class="WADANoResults">
        <div class="WADANoResultsMessage">No record found.</div>
      </div>
      <% End If ' end WADAdbotbl_RM_Materials.EOF And WADAdbotbl_RM_Materials.BOF %>
    </form>
	  <p>  <table border="0">
    <tr>
      <td>  
	  	
  <form name="form2" method="post" action="http://localhost/tbl_RM_Materials_Results.asp">
    <input type="submit" name="Submit" value="Floor Inventory">
  </form>
  <form name="form3" method="post" action="http://localhost/tbl_RM_Materials_Insert_Scarf.asp">
    <input type="submit" name="Submit" value="Raw Materials Page">
  </form>
</td>
    </tr>
  </table>
&nbsp;</p>
 
</div>
</body>
</html>
<%
WADAdbotbl_RM_Materials.Close()
Set WADAdbotbl_RM_Materials = Nothing
%>
<%
rs_Location.Close()
Set rs_Location = Nothing
%>
<%
rs_Status.Close()
Set rs_Status = Nothing
%>
<%
rs_RMaterial_RM_Materials_View.Close()
Set rs_RMaterial_RM_Materials_View = Nothing
%>
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:

Select allOpen in new window

 

by: rcmbPosted on 2009-07-23 at 14:13:53ID: 24930020

Save the original file under a new name for a backup file.
Copy the code below and replace your entire original second page with this code. Run the app and the copy and paste the exact error message here...I will know exactly what your are seeing then.

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/veneermove.asp" -->
<!--#include file="Connections/PWC125.asp" -->
<!--#include file="WA_DataAssist/WA_AppBuilder_VB.asp" -->
<%
	Dim WADAdbotbl_RM_Materials__ParamRM_ID
	WADAdbotbl_RM_Materials__ParamRM_ID = "-1"
	If (Request.QueryString("RM_ID") <> "") Then 
		WADAdbotbl_RM_Materials__ParamRM_ID = Request.QueryString("RM_ID")
	End If
 
	Dim WADAdboRMaterial_RM_Materials__ParamRM_ID
	WADAdboRMaterial_RM_Materials__ParamRM_ID = "-1"
	If (Request.QueryString("RM_ID") <> "") Then 
		WADAdboRMaterial_RM_Materials__ParamRM_ID = Request.QueryString("RM_ID")
	End If
 
	Dim strSQL
	strSQL = "SELECT * FROM dbo.RMaterial_RM_Materials _
	WHERE (RM_BCODE LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "%' _
	OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "') _
	AND (RM_DateTime = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "' _
	OR '1/1/1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "') _
	AND (RM_PurchOrd LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "%' _
	OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "') _
	AND (RM_Location LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "%' _
	OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "') _
	AND (RM_Supplier LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "%' _
	OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "') _
	AND (RM_Grade LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "%' _
	OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "') _
	AND (RM_Thickness LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "%' _
	OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "') _
	AND (RM_Quantity LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "%' _
	OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "') _
	AND (RM_Status LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "%' _
	OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "') _
	AND (RM_Product LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "%' _
	OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "') _
	ORDER BY RM_DateTime DESC"
	response.write strSQL
 
	Dim WADAdbotbl_RM_Materials
	Dim WADAdbotbl_RM_Materials_numRows
	Set WADAdbotbl_RM_Materials = Server.CreateObject("ADODB.Recordset")
	WADAdbotbl_RM_Materials.ActiveConnection = MM_veneermove_STRING
	WADAdbotbl_RM_Materials.Source = "SELECT *  FROM dbo.RMaterial_RM_Materials " _
	& "WHERE (RM_BCODE LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "%' " _
	& "OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "') " _
	& "AND (RM_DateTime = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "' " _
	& "OR '1/1/1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "') " _
	& "AND (RM_PurchOrd LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "%' " _
	& "OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "') " _
	& "AND (RM_Location LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "%' " _
	& "OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "') " _
	& "AND (RM_Supplier LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "%' " _
	& "OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "') " _
	& "AND (RM_Grade LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "%' " _
	& "OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "') " _
	& "AND (RM_Thickness LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "%' " _
	& "OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "') " _
	& "AND (RM_Quantity LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "%' " _
	& "OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "') " _
	& "AND (RM_Status LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "%' " _
	& "OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "') " _
	& "AND (RM_Product LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "%' " _
	& "OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "') " _
	& "ORDER BY RM_DateTime DESC"
 
	WADAdbotbl_RM_Materials.CursorType = 0
	WADAdbotbl_RM_Materials.CursorLocation = 2
	WADAdbotbl_RM_Materials.LockType = 1
	WADAdbotbl_RM_Materials.Open()
 
	WADAdbotbl_RM_Materials_numRows = 0
	Dim WADAdboRMaterial_RM_Materials
	Dim WADAdboRMaterial_RM_Materials_numRows
 
	Set WADAdboRMaterial_RM_Materials = Server.CreateObject("ADODB.Recordset")
	WADAdboRMaterial_RM_Materials.ActiveConnection = MM_veneermove_STRING
	WADAdboRMaterial_RM_Materials.Source = "SELECT * FROM dbo.tbl_RM_Materials WHERE " _
	& "RM_ID = " + Replace(WADAdboRMaterial_RM_Materials__ParamRM_ID, "'", "''") + ""
	WADAdboRMaterial_RM_Materials.CursorType = 0
	WADAdboRMaterial_RM_Materials.CursorLocation = 2
	WADAdboRMaterial_RM_Materials.LockType = 1
	WADAdboRMaterial_RM_Materials.Open()
 
	WADAdboRMaterial_RM_Materials_numRows = 0
	Dim rs_Location
	Dim rs_Location_numRows
 
	Set rs_Location = Server.CreateObject("ADODB.Recordset")
	rs_Location.ActiveConnection = MM_veneermove_STRING
	rs_Location.Source = "SELECT LocationNum FROM dbo.tbl_location ORDER BY LocationNum ASC"
	rs_Location.CursorType = 0
	rs_Location.CursorLocation = 2
	rs_Location.LockType = 1
	rs_Location.Open()
	rs_Location_numRows = 0
	Dim rs_Status
	Dim rs_Status_numRows
 
	Set rs_Status = Server.CreateObject("ADODB.Recordset")
	rs_Status.ActiveConnection = MM_veneermove_STRING
	rs_Status.Source = "SELECT status FROM dbo.tbl_status ORDER BY status_ID ASC"
	rs_Status.CursorType = 0
	rs_Status.CursorLocation = 2
	rs_Status.LockType = 1
	rs_Status.Open()
	rs_Status_numRows = 0
	Dim rs_RMaterial_RM_Materials_View
	Dim rs_RMaterial_RM_Materials_View_numRows
 
	Set rs_RMaterial_RM_Materials_View = Server.CreateObject("ADODB.Recordset")
	rs_RMaterial_RM_Materials_View.ActiveConnection = MM_PWC125_STRING
	rs_RMaterial_RM_Materials_View.Source = "SELECT * FROM dbo.RMaterial_RM_Materials"
	rs_RMaterial_RM_Materials_View.CursorType = 0
	rs_RMaterial_RM_Materials_View.CursorLocation = 2
	rs_RMaterial_RM_Materials_View.LockType = 1
	rs_RMaterial_RM_Materials_View.Open()
	rs_RMaterial_RM_Materials_View_numRows = 0
	'WA Application Builder Update
	If (cStr(Request.Form("Update.x")) <> "") Then
		WA_connection = MM_veneermove_STRING
		WA_table = "dbo.tbl_RM_Materials"
		WA_redirectURL = "tbl_RM_Materials_Results.asp"
		WA_keepQueryString = false
		WA_indexField = "RM_ID"
		WA_fieldNamesStr = "RM_BCODE|RM_DateTime|RM_PurchOrd|RM_Location|RM_Supplier|RM_Grade|RM_Thickness|RM_Quantity|RM_Status|RM_Product"
		WA_fieldValuesStr = "" & cStr(cStr(Request.Form("RM_BCODE"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_DateTime"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_PurchOrd"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Location"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Supplier"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Grade"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Thickness"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Quantity"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Status"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Product"))) & ""
		WA_columnTypesStr = "',none,''|',none,NULL|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''"
		WA_comparisonStr = " LIKE | = | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE "
		WA_fieldNames = Split(WA_fieldNamesStr,"|")
		WA_fieldValues = Split(WA_fieldValuesStr,"|")
		WA_columns = Split(WA_columnTypesStr,"|")
		WA_comparisions = Split(WA_comparisonStr, "|")
		WA_where_fieldValuesStr = "" & cStr(cStr(Request.Form("WADAUpdateRecordID"))) & ""
		WA_where_columnTypesStr = "none,none,NULL"
		WA_where_comparisonStr = "="
		WA_where_fieldNames = Split(WA_indexField,"|")
		WA_where_fieldValues = Split(WA_where_fieldValuesStr,"|")
		WA_where_columns = Split(WA_where_columnTypesStr,"|")
		WA_where_comparisions = Split(WA_where_comparisonStr, "|")
 
		updateParamsObj = WA_AB_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, -1)
		WhereObj = WA_AB_generateWhereClause(WA_where_fieldNames, WA_where_columns, WA_where_fieldValues, WA_where_comparisions)
  
		set MM_editCmd = Server.CreateObject("ADODB.Command")
		MM_editCmd.ActiveConnection = WA_connection
		MM_editCmd.CommandText = "UPDATE " & WA_table & " SET " & updateParamsObj(3) & " WHERE " & WhereObj & ""
		MM_editCmd.Execute()
		MM_editCmd.ActiveConnection.Close()
		If (WA_redirectURL <> "") Then
			If (WA_keepQueryString AND Request.QueryString <> "" AND Request.QueryString.Count > 0) Then
				If (inStr(WA_redirectURL,"?") > 0) Then
					WA_redirectURL = WA_redirectURL & "&"
				Else
					WA_redirectURL = WA_redirectURL & "?"
				End if
				WA_redirectURL = WA_redirectURL & Request.QueryString
			End if
			Response.Redirect(WA_redirectURL)
		End if
	End if
 
	WADAdboRMaterial_RM_Materials.Close()
	Set WADAdboRMaterial_RM_Materials = Nothing
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 
<head>
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<title>Update tbl_RM_Materials</title>
<link href="WA_DataAssist/styles/Modular_Poppy.css" rel="stylesheet" type="text/css" />
<link href="WA_DataAssist/styles/Arial.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background-color: #FFE8E8;
}
.style1 {
	color: #FF0000;
}
.style2 {
	font-size: 16;
}
.style11 {
	color: #FF0000;
	font-size: 16px;
}
.style14 {
	font-size: 18px;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
 
<body onload="document.forms['WADAUpdateForm'].RM_Location.focus();">
 
<body>
 
<div id="Layer1" style="position: absolute; left: 400px; top: 200px; width: 479px; height: 56px; z-index: 1">
	<p class="WADAHeaderText style14">To update the record choose new &quot;Location&quot; 
	&amp; &quot;Status&quot;.</p>
	<p class="WADAHeaderText style2"><span class="style11">
	<span class="style14">To leave the record unchanged click &quot;Cancel&quot;</span>.</span>
	</p>
</div>
<div id="Layer2" style="position: absolute; left: 308px; top: 119px; width: 171px; height: 22px; z-index: 2">
	<em><strong><span class="style1">RESET &quot;LOCATION!&quot;</span></strong></em></div>
<div id="Layer3" class="style1" style="position: absolute; left: 311px; top: 288px; width: 160px; height: 25px; z-index: 3">
	<em><strong>RESET &quot;STATUS!&quot;</strong></em></div>
<div class="WADAUpdateContainer">
	<form id="WADAUpdateForm" action="tbl_RM_Materials_Update.asp" method="post" name="WADAUpdateForm">
		<div class="WADAHeader">
			Update Record: Select new location and press update. </div>
		<table border="0" cellpadding="0" cellspacing="0" class="WADADataTable">
			<tr>
				<th class="WADADataTableHeader">
				<div align="left">
					BCODE:</div>
				</th>
				<td class="WADADataTableCell">
				<input id="RM_BCODE" name="RM_BCODE" readonly size="32" type="text" value='<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_BCODE").Value)&"", """", "&quot;")%>' /></td>
			</tr>
			<tr>
				<th class="WADADataTableHeader">
				<div align="left">
					Date Time:</div>
				</th>
				<td class="WADADataTableCell">
				<input id="RM_DateTime" name="RM_DateTime" readonly size="32" type="text" value="<%response.write( now())%>" /></td>
			</tr>
			<tr>
				<th class="WADADataTableHeader"></th>
				<td class="WADADataTableCell">
				<input id="RM_PurchOrd" name="RM_PurchOrd" readonly size="32" type="Hidden" value='<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_PurchOrd").Value)&"", """", "&quot;")%>' />
				</td>
			</tr>
			<tr>
				<th class="WADADataTableHeader">
				<div align="left">
					Location:</div>
				</th>
				<td class="WADADataTableCell">
				<select name="RM_Location">
				<% While (NOT rs_Location.EOF) %>
				<option value='<%=(rs_Location.Fields.Item("LocationNum").Value)%>'><%=(rs_Location.Fields.Item("LocationNum").Value)%></option>
				<%
					rs_Location.MoveNext()
					Wend
						If (rs_Location.CursorType > 0) Then
							rs_Location.MoveFirst
						Else
							rs_Location.Requery
						End If
				%>
				</select></td>
			</tr>
			<tr>
				<th class="WADADataTableHeader">
				<div align="left">
					Supplier:</div>
				</th>
				<td class="WADADataTableCell">
				<input id="RM_Supplier" name="RM_Supplier" readonly size="32" type="text" value='<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Supplier").Value)&"", """", "&quot;")%>' /></td>
			</tr>
			<tr>
				<th class="WADADataTableHeader">
				<div align="left">
					Grade:</div>
				</th>
				<td class="WADADataTableCell">
				<input id="RM_Grade" name="RM_Grade" readonly size="32" type="text" value='<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Grade").Value)&"", """", "&quot;")%>' /></td>
			</tr>
			<tr>
				<th class="WADADataTableHeader">
				<div align="left">
					Thickness:</div>
				</th>
				<td class="WADADataTableCell">
				<input id="RM_Thickness" name="RM_Thickness" readonly size="32" type="text" value='<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Thickness").Value)&"", """", "&quot;")%>' /></td>
			</tr>
			<tr>
				<th class="WADADataTableHeader">
				<div align="left">
					Quantity:</div>
				</th>
				<td class="WADADataTableCell">
				<input id="RM_Quantity" name="RM_Quantity" readonly size="32" type="text" value='<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Quantity").Value)&"", """", "&quot;")%>' /></td>
			</tr>
			<tr>
				<th class="WADADataTableHeader">
				<div align="left">
					Status:</div>
				</th>
				<td class="WADADataTableCell"><select name="RM_Status">
				<% While (NOT rs_Status.EOF) %>
				<option value='<%=(rs_Status.Fields.Item("status").Value)%>'><%=(rs_Status.Fields.Item("status").Value)%></option>
				<%
					rs_Status.MoveNext()
					Wend
						If (rs_Status.CursorType > 0) Then
							rs_Status.MoveFirst
						Else
							rs_Status.Requery
						End If
				%>
				</select></td>
			</tr>
			<tr>
				<th class="WADADataTableHeader">
				<div align="left">
				</div>
				</th>
				<td class="WADADataTableCell">
				<input id="RM_Product" name="RM_Product" readonly size="32" type="Hidden" value='<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Product").Value)&"", """", "&quot;")%>' />
				</td>
			</tr>
		</table>
		<div class="WADAButtonRow">
			<table border="0" cellpadding="0" cellspacing="0" class="WADADataNavButtons">
				<tr>
					<td class="WADADataNavButtonCell" nowrap="nowrap">
					<input id="Update" alt="Update" border="0" height="17" hspace="0" name="Update" src="WA_DataAssist/images/Poppy/Modular_update.gif" type="image" value="Update" vspace="0" width="56" /></td>
					<td class="WADADataNavButtonCell" nowrap="nowrap">
					<a href="tbl_RM_Materials_Results.asp">
					<img id="Cancel" alt="Cancel" border="0" height="17" name="Cancel" src="WA_DataAssist/images/Poppy/Modular_cancel.gif" width="56" /></a></td>
				</tr>
			</table>
			<input id="WADAUpdateRecordID" name="WADAUpdateRecordID" type="hidden" value='<%=Server.URLEncode((WADAdbotbl_RM_Materials.Fields.Item("RM_ID").Value))%>'>
		</div>
		<% If WADAdbotbl_RM_Materials.EOF And WADAdbotbl_RM_Materials.BOF Then %>
		<div class="WADANoResults">
			<div class="WADANoResultsMessage">
				No record found.</div>
		</div>
		<% End If 'end WADAdbotbl_RM_Materials.EOF And WADAdbotbl_RM_Materials.BOF %>
	</form>
	<p>
	<table border="0">
		<tr>
			<td>
			<form action="http://localhost/tbl_RM_Materials_Results.asp" method="post" name="form2">
				<input name="Submit" type="submit" value="Floor Inventory">
			</form>
			<form action="http://localhost/tbl_RM_Materials_Insert_Scarf.asp" method="post" name="form3">
				<input name="Submit" type="submit" value="Raw Materials Page">
			</form>
			</td>
		</tr>
	</table>
&nbsp;</p>
</div>
 
</body>
 
</html>
<%
	WADAdbotbl_RM_Materials.Close()
	Set WADAdbotbl_RM_Materials = Nothing
	rs_Location.Close()
	Set rs_Location = Nothing
	rs_Status.Close()
	Set rs_Status = Nothing
	rs_RMaterial_RM_Materials_View.Close()
	Set rs_RMaterial_RM_Materials_View = Nothing
%>
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:

Select allOpen in new window

 

by: SamuelClemmonsPosted on 2009-07-23 at 15:19:46ID: 24930575

Just tried your new page. I received this error:


Technical Information (for support personnel)
"      Error Type:
Microsoft VBScript compilation (0x800A0409)
Unterminated string constant
/tbl_RM_Materials_Update.asp, line 19, column 52
strSQL = "SELECT * FROM dbo.RMaterial_RM_Materials _
---------------------------------------------------^
"      Browser Type:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
"      Page:
GET /tbl_RM_Materials_Update.asp
"      Time:


Have to step away from my desk for a few minutes. Thanks your your help

 

by: SamuelClemmonsPosted on 2009-07-23 at 15:24:49ID: 24930611

I just checked the Record set and the it is attached to the table for the "Location" drop down list that show where the item will be stored. It should be pointed at the view "RMaterial_RM_Materials"

 

by: SamuelClemmonsPosted on 2009-07-23 at 15:39:15ID: 24930715

Below is the page we are working on when it worked. At this time we only needed to select from the table: tbl_RM_Materials.

Then things were changed and we had to select from a view called: RMaterial_RM_Materials this is when we began to have problems.

The two pages prior to the update page were changed and worked. The update page failed when the Results page sent a record to it.

I think you are on the correct path with your new code and I though maybe you should look at this before we go further. There is too much code in the old page that is not being used and in the new code you gave two of the record sets disappeared.

Maybe we could try your new code on the original page with some adjustments you could make after looking at this page.

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/veneermove.asp" -->
<!--#include file="WA_DataAssist/WA_AppBuilder_VB.asp" -->
<%
Dim WADAdbotbl_RM_Materials__ParamRM_ID
WADAdbotbl_RM_Materials__ParamRM_ID = "-1"
If (Request.QueryString("RM_ID") <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_ID = Request.QueryString("RM_ID")
End If
%>
<%
Dim WADAdbotbl_RM_Materials
Dim WADAdbotbl_RM_Materials_numRows
 
Set WADAdbotbl_RM_Materials = Server.CreateObject("ADODB.Recordset")
WADAdbotbl_RM_Materials.ActiveConnection = MM_veneermove_STRING
WADAdbotbl_RM_Materials.Source = "SELECT * FROM dbo.tbl_RM_Materials WHERE RM_ID = " + Replace(WADAdbotbl_RM_Materials__ParamRM_ID, "'", "''") + ""
WADAdbotbl_RM_Materials.CursorType = 0
WADAdbotbl_RM_Materials.CursorLocation = 2
WADAdbotbl_RM_Materials.LockType = 1
WADAdbotbl_RM_Materials.Open()
 
WADAdbotbl_RM_Materials_numRows = 0
%>
<%
Dim rs_Location
Dim rs_Location_numRows
 
Set rs_Location = Server.CreateObject("ADODB.Recordset")
rs_Location.ActiveConnection = MM_veneermove_STRING
rs_Location.Source = "SELECT LocationNum FROM dbo.tbl_location ORDER BY LocationNum ASC"
rs_Location.CursorType = 0
rs_Location.CursorLocation = 2
rs_Location.LockType = 1
rs_Location.Open()
 
rs_Location_numRows = 0
%>
<%
Dim rs_Status
Dim rs_Status_numRows
 
Set rs_Status = Server.CreateObject("ADODB.Recordset")
rs_Status.ActiveConnection = MM_veneermove_STRING
rs_Status.Source = "SELECT status FROM dbo.tbl_status ORDER BY status_ID ASC"
rs_Status.CursorType = 0
rs_Status.CursorLocation = 2
rs_Status.LockType = 1
rs_Status.Open()
 
rs_Status_numRows = 0
%>
<%
' WA Application Builder Update
if (cStr(Request.Form("Update.x")) <> "")  then
  WA_connection = MM_veneermove_STRING
  WA_table = "dbo.tbl_RM_Materials"
  WA_redirectURL = "tbl_RM_Materials_Results.asp"
  WA_keepQueryString = false
  WA_indexField = "RM_ID"
  WA_fieldNamesStr = "RM_BCODE|RM_DateTime|RM_PurchOrd|RM_Location|RM_Supplier|RM_Grade|RM_Thickness|RM_Quantity|RM_Status|RM_Product"
  WA_fieldValuesStr = "" & cStr(cStr(Request.Form("RM_BCODE"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_DateTime"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_PurchOrd"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Location"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Supplier"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Grade"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Thickness"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Quantity"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Status"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Product"))) & ""
  WA_columnTypesStr = "',none,''|',none,NULL|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''"
  WA_comparisonStr = " LIKE | = | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE "
  WA_fieldNames = Split(WA_fieldNamesStr,"|")
  WA_fieldValues = Split(WA_fieldValuesStr,"|")
  WA_columns = Split(WA_columnTypesStr,"|")
  WA_comparisions = Split(WA_comparisonStr, "|")
 
  WA_where_fieldValuesStr = "" & cStr(cStr(Request.Form("WADAUpdateRecordID"))) & ""
  WA_where_columnTypesStr = "none,none,NULL"
  WA_where_comparisonStr = "="
  WA_where_fieldNames = Split(WA_indexField,"|")
  WA_where_fieldValues = Split(WA_where_fieldValuesStr,"|")
  WA_where_columns = Split(WA_where_columnTypesStr,"|")
  WA_where_comparisions = Split(WA_where_comparisonStr, "|")
  
 
  updateParamsObj = WA_AB_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, -1)
  WhereObj = WA_AB_generateWhereClause(WA_where_fieldNames, WA_where_columns, WA_where_fieldValues, WA_where_comparisions)
  
  set MM_editCmd = Server.CreateObject("ADODB.Command")
  MM_editCmd.ActiveConnection = WA_connection
  MM_editCmd.CommandText = "UPDATE " & WA_table & " SET " & updateParamsObj(3) & " WHERE " & WhereObj & ""
  MM_editCmd.Execute()
  MM_editCmd.ActiveConnection.Close()
  if (WA_redirectURL <> "")  then
    if (WA_keepQueryString AND Request.QueryString <> "" AND Request.QueryString.Count > 0) then
      if (inStr(WA_redirectURL,"?") > 0)  then
	    WA_redirectURL = WA_redirectURL & "&"
      else
	    WA_redirectURL = WA_redirectURL & "?"
	  end if
      WA_redirectURL = WA_redirectURL & Request.QueryString
    end if
    Response.Redirect(WA_redirectURL)
  end if
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Update tbl_RM_Materials</title>
<link href="WA_DataAssist/styles/Modular_Poppy.css" rel="stylesheet" type="text/css" />
<link href="WA_DataAssist/styles/Arial.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background-color: #FFE8E8;
}
.style1 {color: #FF0000}
.style2 {font-size: 16}
.style11 {color: #FF0000; font-size: 16px; }
.style14 {font-size: 18px}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
 
<body onload="document.forms['WADAUpdateForm'].RM_Location.focus();">
<body>
 
<div id="Layer1" style="position:absolute; left:400px; top:200px; width:479px; height:56px; z-index:1"> 
  <p class="WADAHeaderText style14">To update the record choose new &quot;Location&quot; &amp; &quot;Status&quot;.</p>
  <p class="WADAHeaderText style2"><span class="style11"><span class="style14">To leave the record unchanged click &quot;Cancel&quot;</span>.</span> </p>
</div>
<div id="Layer2" style="position:absolute; left:308px; top:119px; width:171px; height:22px; z-index:2"><em><strong><span class="style1">RESET &quot;LOCATION!&quot;</span></strong></em></div>
<div id="Layer3" style="position:absolute; left:311px; top:288px; width:160px; height:25px; z-index:3" class="style1"><em><strong>RESET &quot;STATUS!&quot;</strong></em></div>
<div class="WADAUpdateContainer"> 
    <form action="tbl_RM_Materials_Update.asp" method="post" name="WADAUpdateForm" id="WADAUpdateForm">
      <div class="WADAHeader">Update Record: Select new location  and press update. </div>
      <table class="WADADataTable" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <th class="WADADataTableHeader"><div align="left">BCODE:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_BCODE" id="RM_BCODE" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_BCODE").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Date Time:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_DateTime" id="RM_DateTime" value="<%response.write( now())%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"></th>
          <td class="WADADataTableCell"><input type="Hidden" readonly name="RM_PurchOrd" id="RM_PurchOrd" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_PurchOrd").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Location:</div></th>
          <td class="WADADataTableCell">
            <select name="RM_Location">
              <%
While (NOT rs_Location.EOF)
%>
              <option value="<%=(rs_Location.Fields.Item("LocationNum").Value)%>"><%=(rs_Location.Fields.Item("LocationNum").Value)%></option>
              <%
  rs_Location.MoveNext()
Wend
If (rs_Location.CursorType > 0) Then
  rs_Location.MoveFirst
Else
  rs_Location.Requery
End If
%>
          </select></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Supplier:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Supplier" id="RM_Supplier" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Supplier").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Grade:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Grade" id="RM_Grade" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Grade").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Thickness:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Thickness" id="RM_Thickness" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Thickness").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Quantity:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Quantity" id="RM_Quantity" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Quantity").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Status:</div></th>
          <td class="WADADataTableCell"><select name="RM_Status">
            <%
While (NOT rs_Status.EOF)
%>
            <option value="<%=(rs_Status.Fields.Item("status").Value)%>"><%=(rs_Status.Fields.Item("status").Value)%></option>
            <%
  rs_Status.MoveNext()
Wend
If (rs_Status.CursorType > 0) Then
  rs_Status.MoveFirst
Else
  rs_Status.Requery
End If
%>
          </select></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left"></div></th>
          <td class="WADADataTableCell"><input type="Hidden" readonly name="RM_Product" id="RM_Product" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Product").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
      </table>
      <div class="WADAButtonRow">
        <table class="WADADataNavButtons" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td class="WADADataNavButtonCell" nowrap="nowrap"><input name="Update" type="image" id="Update" value="Update" src="WA_DataAssist/images/Poppy/Modular_update.gif" alt="Update" width="56" height="17" hspace="0" vspace="0" border="0"  /></td>
            <td class="WADADataNavButtonCell" nowrap="nowrap"><a href="tbl_RM_Materials_Results.asp"><img src="WA_DataAssist/images/Poppy/Modular_cancel.gif" alt="Cancel" name="Cancel" width="56" height="17" border="0" id="Cancel" /></a></td>
          </tr>
        </table>
        <input name="WADAUpdateRecordID" type="hidden" id="WADAUpdateRecordID" value="<%=Server.URLEncode((WADAdbotbl_RM_Materials.Fields.Item("RM_ID").Value))%>">
      </div>
       <% If WADAdbotbl_RM_Materials.EOF And WADAdbotbl_RM_Materials.BOF Then %>
      <div class="WADANoResults">
        <div class="WADANoResultsMessage">No record found.</div>
      </div>
      <% End If ' end WADAdbotbl_RM_Materials.EOF And WADAdbotbl_RM_Materials.BOF %>
    </form>
	  <p>  <table border="0">
    <tr>
      <td>  
	  	
  <form name="form2" method="post" action="http://localhost/pwc125/tbl_RM_Materials_Results.asp">
    <input type="submit" name="Submit" value="Floor Inventory">
  </form>
  <form name="form3" method="post" action="http://localhost/pwc125/tbl_RM_Materials_Insert_Scarf.asp">
    <input type="submit" name="Submit" value="Scarf Page">
  </form>
</td>
    </tr>
  </table>
&nbsp;</p>
 
</div>
</body>
</html>
<%
WADAdbotbl_RM_Materials.Close()
Set WADAdbotbl_RM_Materials = Nothing
%>
<%
rs_Location.Close()
Set rs_Location = Nothing
%>
<%
rs_Status.Close()
Set rs_Status = Nothing
%>
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:

Select allOpen in new window

 

by: SamuelClemmonsPosted on 2009-07-24 at 16:42:16ID: 24940026

rcmb,

Are you still there??

 

by: SamuelClemmonsPosted on 2009-07-28 at 13:39:31ID: 24964974

My current error is as follows:

Technical Information (for support personnel)
"      Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]UNION ALL view 'RMaterial_RM_Materials' is not updatable because the definiton of column 'Expr2' of view '[RMaterial_RM_Materials]' is used by another view column.
/tbl_RM_Materials_Update.asp, line 78
"      Browser Type:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1 (.NET CLR 3.5.30729)
"      Page:
POST 289 bytes to /tbl_RM_Materials_Update.asp
"      POST Data:
RM_BCODE=10002+++++++++++++++++++++++++++++++++++++++++++++&RM_DateTime=7%2F28%2F2009+1%3A27%3A32+PM&RM_PurchOrd=&RM_Location=S402&RM_Supplier=Weyerhaeuser&RM_Grade=G1_DF&RM_Thickness=0.438&RM_Quantit . . .
"      Time:
Tuesday, July 28, 2009, 1:28:01 PM

My first page has changed to what you see below:
 
_________________________________________________
 
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/veneermove.asp" -->
<!--#include file="WA_DataAssist/WA_AppBuilder_VB.asp" -->
<%
If Session("dbotbl_RM_Materials_Results_QueryString") <> "" AND Request.ServerVariables("QUERY_STRING") = "" Then
Response.Redirect("tbl_RM_Materials_Results.asp?" & Session("dbotbl_RM_Materials_Results_QueryString"))
Else
Session("dbotbl_RM_Materials_Results_QueryString") = Request.QueryString
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_BCODE
WADAdbotbl_RM_Materials__ParamRM_BCODE = "-1"
If (cStr(Request("S_RM_BCODE")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_BCODE = cStr(Request("S_RM_BCODE"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_DateTime
WADAdbotbl_RM_Materials__ParamRM_DateTime = "1/1/1"
If (cStr(Request("S_RM_DateTime")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_DateTime = cStr(Request("S_RM_DateTime"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_PurchOrd
WADAdbotbl_RM_Materials__ParamRM_PurchOrd = "-1"
If (cStr(Request("S_RM_PurchOrd")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_PurchOrd = cStr(Request("S_RM_PurchOrd"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Location
WADAdbotbl_RM_Materials__ParamRM_Location = "-1"
If (cStr(Request("S_RM_Location")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Location = cStr(Request("S_RM_Location"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Supplier
WADAdbotbl_RM_Materials__ParamRM_Supplier = "-1"
If (cStr(Request("S_RM_Supplier")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Supplier = cStr(Request("S_RM_Supplier"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Grade
WADAdbotbl_RM_Materials__ParamRM_Grade = "-1"
If (cStr(Request("S_RM_Grade")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Grade = cStr(Request("S_RM_Grade"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Thickness
WADAdbotbl_RM_Materials__ParamRM_Thickness = "-1"
If (cStr(Request("S_RM_Thickness")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Thickness = cStr(Request("S_RM_Thickness"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Quantity
WADAdbotbl_RM_Materials__ParamRM_Quantity = "-1"
If (cStr(Request("S_RM_Quantity")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Quantity = cStr(Request("S_RM_Quantity"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Status
WADAdbotbl_RM_Materials__ParamRM_Status = "-1"
If (cStr(Request("S_RM_Status")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Status = cStr(Request("S_RM_Status"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Product
WADAdbotbl_RM_Materials__ParamRM_Product = "-1"
If (cStr(Request("S_RM_Product")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Product = cStr(Request("S_RM_Product"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials
Dim WADAdbotbl_RM_Materials_numRows
 
Set WADAdbotbl_RM_Materials = Server.CreateObject("ADODB.Recordset")
WADAdbotbl_RM_Materials.ActiveConnection = MM_veneermove_STRING
WADAdbotbl_RM_Materials.Source = "SELECT *  FROM dbo.RMaterial_RM_Materials  WHERE (RM_BCODE LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "') AND (RM_DateTime = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "' OR '1/1/1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "') AND (RM_PurchOrd LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "') AND (RM_Location LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "') AND (RM_Supplier LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "') AND (RM_Grade LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "') AND (RM_Thickness LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "') AND (RM_Quantity LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "') AND (RM_Status LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "') AND (RM_Product LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "')  ORDER BY RM_DateTime DESC"
WADAdbotbl_RM_Materials.CursorType = 0
WADAdbotbl_RM_Materials.CursorLocation = 2
WADAdbotbl_RM_Materials.LockType = 1
WADAdbotbl_RM_Materials.Open()
 
WADAdbotbl_RM_Materials_numRows = 0
%>
<%
Dim WADAdbotbl_RM_Materials_1__numRows
Dim WADAdbotbl_RM_Materials_1__index
 
WADAdbotbl_RM_Materials_1__numRows = 1
WADAdbotbl_RM_Materials_1__index = 0
WADAdbotbl_RM_Materials_numRows = WADAdbotbl_RM_Materials_numRows + WADAdbotbl_RM_Materials_1__numRows
%>
<%
'  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
 
Dim WADAdbotbl_RM_Materials_total
Dim WADAdbotbl_RM_Materials_first
Dim WADAdbotbl_RM_Materials_last
 
' set the record count
WADAdbotbl_RM_Materials_total = WADAdbotbl_RM_Materials.RecordCount
 
' set the number of rows displayed on this page
If (WADAdbotbl_RM_Materials_numRows < 0) Then
  WADAdbotbl_RM_Materials_numRows = WADAdbotbl_RM_Materials_total
Elseif (WADAdbotbl_RM_Materials_numRows = 0) Then
  WADAdbotbl_RM_Materials_numRows = 1
End If
 
' set the first and last displayed record
WADAdbotbl_RM_Materials_first = 1
WADAdbotbl_RM_Materials_last  = WADAdbotbl_RM_Materials_first + WADAdbotbl_RM_Materials_numRows - 1
 
' if we have the correct record count, check the other stats
If (WADAdbotbl_RM_Materials_total <> -1) Then
  If (WADAdbotbl_RM_Materials_first > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_first = WADAdbotbl_RM_Materials_total
  End If
  If (WADAdbotbl_RM_Materials_last > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_last = WADAdbotbl_RM_Materials_total
  End If
  If (WADAdbotbl_RM_Materials_numRows > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_numRows = WADAdbotbl_RM_Materials_total
  End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
 
If (WADAdbotbl_RM_Materials_total = -1) Then
 
  ' count the total records by iterating through the recordset
  WADAdbotbl_RM_Materials_total=0
  While (Not WADAdbotbl_RM_Materials.EOF)
    WADAdbotbl_RM_Materials_total = WADAdbotbl_RM_Materials_total + 1
    WADAdbotbl_RM_Materials.MoveNext
  Wend
 
  ' reset the cursor to the beginning
  If (WADAdbotbl_RM_Materials.CursorType > 0) Then
    WADAdbotbl_RM_Materials.MoveFirst
  Else
    WADAdbotbl_RM_Materials.Requery
  End If
 
  ' set the number of rows displayed on this page
  If (WADAdbotbl_RM_Materials_numRows < 0 Or WADAdbotbl_RM_Materials_numRows > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_numRows = WADAdbotbl_RM_Materials_total
  End If
 
  ' set the first and last displayed record
  WADAdbotbl_RM_Materials_first = 1
  WADAdbotbl_RM_Materials_last = WADAdbotbl_RM_Materials_first + WADAdbotbl_RM_Materials_numRows - 1
  
  If (WADAdbotbl_RM_Materials_first > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_first = WADAdbotbl_RM_Materials_total
  End If
  If (WADAdbotbl_RM_Materials_last > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_last = WADAdbotbl_RM_Materials_total
  End If
 
End If
%>
<%
Dim MM_paramName 
%>
<%
' *** Move To Record and Go To Record: declare variables
 
Dim MM_rs
Dim MM_rsCount
Dim MM_size
Dim MM_uniqueCol
Dim MM_offset
Dim MM_atTotal
Dim MM_paramIsDefined
 
Dim MM_param
Dim MM_index
 
Set MM_rs    = WADAdbotbl_RM_Materials
MM_rsCount   = WADAdbotbl_RM_Materials_total
MM_size      = WADAdbotbl_RM_Materials_numRows
MM_uniqueCol = ""
MM_paramName = ""
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName <> "") Then
  MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
End If
%>
<%
' *** Move To Record: handle 'index' or 'offset' parameter
 
if (Not MM_paramIsDefined And MM_rsCount <> 0) then
 
  ' use index parameter if defined, otherwise use offset parameter
  MM_param = Request.QueryString("index")
  If (MM_param = "") Then
    MM_param = Request.QueryString("offset")
  End If
  If (MM_param <> "") Then
    MM_offset = Int(MM_param)
  End If
 
  ' if we have a record count, check if we are past the end of the recordset
  If (MM_rsCount <> -1) Then
    If (MM_offset >= MM_rsCount Or MM_offset = -1) Then  ' past end or move last
      If ((MM_rsCount Mod MM_size) > 0) Then         ' last page not a full repeat region
        MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
      Else
        MM_offset = MM_rsCount - MM_size
      End If
    End If
  End If
 
  ' move the cursor to the selected record
  MM_index = 0
  While ((Not MM_rs.EOF) And (MM_index < MM_offset Or MM_offset = -1))
    MM_rs.MoveNext
    MM_index = MM_index + 1
  Wend
  If (MM_rs.EOF) Then 
    MM_offset = MM_index  ' set MM_offset to the last possible record
  End If
 
End If
%>
<%
' *** Move To Record: if we dont know the record count, check the display range
 
If (MM_rsCount = -1) Then
 
  ' walk to the end of the display range for this page
  MM_index = MM_offset
  While (Not MM_rs.EOF And (MM_size < 0 Or MM_index < MM_offset + MM_size))
    MM_rs.MoveNext
    MM_index = MM_index + 1
  Wend
 
  ' if we walked off the end of the recordset, set MM_rsCount and MM_size
  If (MM_rs.EOF) Then
    MM_rsCount = MM_index
    If (MM_size < 0 Or MM_size > MM_rsCount) Then
      MM_size = MM_rsCount
    End If
  End If
 
  ' if we walked off the end, set the offset based on page size
  If (MM_rs.EOF And Not MM_paramIsDefined) Then
    If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
      If ((MM_rsCount Mod MM_size) > 0) Then
        MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
      Else
        MM_offset = MM_rsCount - MM_size
      End If
    End If
  End If
 
  ' reset the cursor to the beginning
  If (MM_rs.CursorType > 0) Then
    MM_rs.MoveFirst
  Else
    MM_rs.Requery
  End If
 
  ' move the cursor to the selected record
  MM_index = 0
  While (Not MM_rs.EOF And MM_index < MM_offset)
    MM_rs.MoveNext
    MM_index = MM_index + 1
  Wend
End If
%>
<%
' *** Move To Record: update recordset stats
 
' set the first and last displayed record
WADAdbotbl_RM_Materials_first = MM_offset + 1
WADAdbotbl_RM_Materials_last  = MM_offset + MM_size
 
If (MM_rsCount <> -1) Then
  If (WADAdbotbl_RM_Materials_first > MM_rsCount) Then
    WADAdbotbl_RM_Materials_first = MM_rsCount
  End If
  If (WADAdbotbl_RM_Materials_last > MM_rsCount) Then
    WADAdbotbl_RM_Materials_last = MM_rsCount
  End If
End If
 
' set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
 
Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth
 
Dim MM_removeList
Dim MM_item
Dim MM_nextItem
 
' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
  MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If
 
MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""
 
' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
  End If
Next
 
' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
  End If
Next
 
' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then 
  MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "")  Then
  MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
  MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If
 
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>
<%
' *** Move To Record: set the strings for the first, last, next, and previous links
 
Dim MM_keepMove
Dim MM_moveParam
Dim MM_moveFirst
Dim MM_moveLast
Dim MM_moveNext
Dim MM_movePrev
 
Dim MM_urlStr
Dim MM_paramList
Dim MM_paramIndex
Dim MM_nextParam
 
MM_keepMove = MM_keepBoth
MM_moveParam = "index"
 
' if the page has a repeated region, remove 'offset' from the maintained parameters
If (MM_size > 1) Then
  MM_moveParam = "offset"
  If (MM_keepMove <> "") Then
    MM_paramList = Split(MM_keepMove, "&")
    MM_keepMove = ""
    For MM_paramIndex = 0 To UBound(MM_paramList)
      MM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=") - 1)
      If (StrComp(MM_nextParam,MM_moveParam,1) <> 0) Then
        MM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex)
      End If
    Next
    If (MM_keepMove <> "") Then
      MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
    End If
  End If
End If
 
' set the strings for the move to links
If (MM_keepMove <> "") Then 
  MM_keepMove = Server.HTMLEncode(MM_keepMove) & "&"
End If
 
MM_urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="
 
MM_moveFirst = MM_urlStr & "0"
MM_moveLast  = MM_urlStr & "-1"
MM_moveNext  = MM_urlStr & CStr(MM_offset + MM_size)
If (MM_offset - MM_size < 0) Then
  MM_movePrev = MM_urlStr & "0"
Else
  MM_movePrev = MM_urlStr & CStr(MM_offset - MM_size)
End If
%>
<%
'WA AltClass Iterator
class WA_AltClassIterator
  public ClassArray
  public ClassCounter
end class
 
function WA_AltClassIterator_getClass(loopObj, incrementClass) 
  if (UBound(loopObj.ClassArray) = 0) then
    WA_AltClassIterator_getClass = ""
    exit function
  end if
  if (incrementClass) then
    if (loopObj.ClassCounter > UBound(loopObj.ClassArray)) then
      loopObj.ClassCounter = 0
    end if
    loopObj.ClassCounter = loopObj.ClassCounter + 1
  end if
  if (loopObj.ClassCounter > 0) then
    WA_AltClassIterator_getClass = loopObj.ClassArray(loopObj.ClassCounter-1)
  else
    WA_AltClassIterator_getClass = loopObj.ClassArray(0)
  end if
end function
%>
<%
'WA Alternating Class
Dim WARRT_AltClass1
Set WARRT_AltClass1 = new WA_AltClassIterator
WARRT_AltClass1.ClassCounter = 0
WARRT_AltClass1.ClassArray = Split("WADAResultsRowDark|", "|")
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Results tbl_RM_Materials</title>
<link href="WA_DataAssist/styles/Modular_Pacifica.css" rel="stylesheet" type="text/css" />
<link href="WA_DataAssist/styles/Arial.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background-color: #95CAFF;
}
.style1 {font-size: 14px}
a:link {
	color: #1E23F9;
}
a:visited {
	color: #D80FDC;
}
a:hover {
	color: #000000;
}
a:active {
	color: #FF0000;
}
-->
</style></head>
 
<body>
 
<body onload="document.forms['WADASearchForm'].S_RM_BCODE.focus();">
 
<div class="WADASearchContainer">
  <form action="tbl_RM_Materials_Results.asp" method="get" name="WADASearchForm" id="WADASearchForm">
    <div class="WADAHeader style1">SCAN BAR CODE TO RETREIVE FROM FLOOR INVENTORY</div>
    <table class="WADADataTable" cellpadding="0" cellspacing="0" border="0">
      <tr>
        <th class="WADADataTableHeader"><div align="left">BCODE:</div></th>
        <td class="WADADataTableCell"><input type="text" name="S_RM_BCODE" id="S_RM_BCODE" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_DateTime" id="S_RM_DateTime" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_PurchOrd" id="S_RM_PurchOrd" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Location" id="S_RM_Location" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Supplier" id="S_RM_Supplier" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Grade" id="S_RM_Grade" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Thickness" id="S_RM_Thickness" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Quantity" id="S_RM_Quantity" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Status" id="S_RM_Status" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Product" id="S_RM_Product" value="" size="20" /></td>
      </tr>
    </table>
    <table width="620" border="0" align="right">
      <tr>
        <td>  <% If Not WADAdbotbl_RM_Materials.EOF Or Not WADAdbotbl_RM_Materials.BOF Then %>
  <div class="WADAResults">
    <div class="WADAResultsNavigation">
      <div class="WADAResultsCount">Records <%=(WADAdbotbl_RM_Materials_first)%> to <%=(WADAdbotbl_RM_Materials_last)%> of <%=(WADAdbotbl_RM_Materials_total)%></div>
      <div class="WADAResultsNavTop">
        <table border="0" cellpadding="0" cellspacing="0" class="WADAResultsNavTable">
          <tr valign="middle">
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If MM_offset <> 0 Then %><a href="<%=MM_moveFirst%>" ><img src="WA_DataAssist/images/Pacifica/Modular_firsttxt.gif" alt="First" name="First" width="56" height="17" border="0" id="First" /></a>
                  <% End If ' end MM_offset <> 0 %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If MM_offset <> 0 Then %><a href="<%=MM_movePrev%>" ><img src="WA_DataAssist/images/Pacifica/Modular_previoustxt.gif" alt="Previous" name="Previous" width="56" height="17" border="0" id="Previous" /></a>
                  <% End If ' end MM_offset <> 0 %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If Not MM_atTotal Then %><a href="<%=MM_moveNext%>" ><img src="WA_DataAssist/images/Pacifica/Modular_nexttxt.gif" alt="Next" name="Next" width="56" height="17" border="0" id="Next" /></a>
                  <% End If ' end Not MM_atTotal %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If Not MM_atTotal Then %><a href="<%=MM_moveLast%>" ><img src="WA_DataAssist/images/Pacifica/Modular_lasttxt.gif" alt="Last" name="Last" width="56" height="17" border="0" id="Last" /></a>
                  <% End If ' end Not MM_atTotal %></td>
          </tr>
        </table>
      </div>
      <div class="WADAResultsInsertButton">  </div>
    </div>
    <table class="WADAResultsTable" border="1" cellpadding="1" cellspacing="1">
      <% 
While ((WADAdbotbl_RM_Materials_1__numRows <> 0) AND (NOT WADAdbotbl_RM_Materials.EOF)) 
%>
      <tr class="<%=WA_AltClassIterator_getClass(WARRT_AltClass1,true)%>">
	  	<tr>
	    <th class="WADAResultsTableHeader">BCODE:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_BCODE").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Date Time:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_DateTime").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Purchase Order:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_PurchOrd").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Location:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Location").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Supplier:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Supplier").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Grade:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Grade").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Thickness:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Thickness").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Quantity:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Quantity").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Status:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Status").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Product:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Product").Value)%></td>
		</tr>
		<th></th>
        <td class="WADAResultsEditButtons" nowrap="nowrap"><table class="WADAEditButton_Table">
            <tr>
              <td></td>
              <td><a href="tbl_RM_Materials_Update.asp"><img src="WA_DataAssist/images/Pacifica/Modular_update.gif" alt="Update" name="Update" width="56" height="17" border="0" id="Update" /></a></td>
              <td></td>
            </tr>
        </table></td>
      </tr>
      <% 
  WADAdbotbl_RM_Materials_1__index=WADAdbotbl_RM_Materials_1__index+1
  WADAdbotbl_RM_Materials_1__numRows=WADAdbotbl_RM_Materials_1__numRows-1
  WADAdbotbl_RM_Materials.MoveNext()
Wend
%>
    </table>
    <div class="WADAResultsNavigation">
      <div class="WADAResultsCount">Records <%=(WADAdbotbl_RM_Materials_first)%> to <%=(WADAdbotbl_RM_Materials_last)%> of <%=(WADAdbotbl_RM_Materials_total)%></div>
      <div class="WADAResultsNavBottom">
        <table border="0" cellpadding="0" cellspacing="0" class="WADAResultsNavTable">
          <tr valign="middle">
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If MM_offset <> 0 Then %><a href="<%=MM_moveFirst%>" ><img src="WA_DataAssist/images/Pacifica/Modular_firsttxt.gif" alt="First" name="First" width="56" height="17" border="0" id="First" /></a>
                  <% End If ' end MM_offset <> 0 %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If MM_offset <> 0 Then %><a href="<%=MM_movePrev%>" ><img src="WA_DataAssist/images/Pacifica/Modular_previoustxt.gif" alt="Previous" name="Previous" width="56" height="17" border="0" id="Previous" /></a>
                  <% End If ' end MM_offset <> 0 %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If Not MM_atTotal Then %><a href="<%=MM_moveNext%>" ><img src="WA_DataAssist/images/Pacifica/Modular_nexttxt.gif" alt="Next" name="Next" width="56" height="17" border="0" id="Next" /></a>
                  <% End If ' end Not MM_atTotal %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If Not MM_atTotal Then %><a href="<%=MM_moveLast%>" ><img src="WA_DataAssist/images/Pacifica/Modular_lasttxt.gif" alt="Last" name="Last" width="56" height="17" border="0" id="Last" /></a>
                  <% End If ' end Not MM_atTotal %></td>
          </tr>
        </table>
      </div>
    </div>
  </div>
  <% End If ' end Not WADAdbotbl_RM_Materials.EOF Or NOT WADAdbotbl_RM_Materials.BOF %> <% If WADAdbotbl_RM_Materials.EOF And WADAdbotbl_RM_Materials.BOF Then %>
  <div class="WADANoResults">
    <div class="WADANoResultsMessage">No results for your search</div>
    <div> <a href="tbl_RM_Materials_Insert_Scarf.asp"><img border="0" name="Insert" id="Insert" alt="Insert" src="WA_DataAssist/images/Pacifica/Modular_insert.gif" /></a> </div>
  </div>
<% End If ' end WADAdbotbl_RM_Materials.EOF And WADAdbotbl_RM_Materials.BOF %> 
</td>
      </tr>
    </table>
    <div class="WADAButtonRow">
      <table class="WADADataNavButtons" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td class="WADADataNavButtonCell" nowrap="nowrap"><input name="Search" type="image" id="Search" value="Search" src="WA_DataAssist/images/Pacifica/Modular_search.gif" alt="Search" width="56" height="17" hspace="0" vspace="0" border="0"  /></td>
        </tr>
      </table>
    </div>
  </form>
</div>
<div class="WADAResultsContainer">
  <div class="WADAResultsHeader">
    <div class="WADAHeaderText">
	
  
  <form name="form3" method="post" action="http://localhost/tbl_RM_Materials_Insert_Scarf.asp">
    <input type="submit" name="Submit" value="Raw Materials">
  </form>
  <p>PRESS UPDATE TO CHANGE LOCATION OR MAKE CORRECTIONS</p>
  <p><a href="FloorMov_Instruc.htm" class="WADAHeaderText">Page Instructions</a> </p>
  <p><a href="NewUpdatePage.asp">PageLink</a></p>
    </div>
  </div>
</body>
</html>
<%
WADAdbotbl_RM_Materials.Close()
Set WADAdbotbl_RM_Materials = Nothing
%>
 
 
________________________________________________________________
 
The update page with the error is now like this:
 
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/veneermove.asp" -->
<!--#include file="WA_DataAssist/WA_AppBuilder_VB.asp" -->
<%
Dim WADAdboRMaterial_RM_Materials
Dim WADAdboRMaterial_RM_Materials_numRows
 
Set WADAdboRMaterial_RM_Materials = Server.CreateObject("ADODB.Recordset")
WADAdboRMaterial_RM_Materials.ActiveConnection = MM_veneermove_STRING
WADAdboRMaterial_RM_Materials.Source = "SELECT     AllBarcodes.*, AllBarcodes.RM_BCODE AS Expr1, AllBarcodes.RM_ID AS Expr2  FROM         (SELECT     RM_BCODE, MAX(RM_Datetime) RM_Datetime                         FROM          (SELECT     RM_BCODE, RM_Datetime                                                 FROM          PWC125.veneer.dbo.tbl_RM_Materials                                                 UNION ALL                                                 SELECT     BCODE AS RM_BCODE, RMDatetime                                                 FROM         PWC125.Veneer.dbo.RMaterial) A                         GROUP BY RM_BCODE) LastDate INNER JOIN                            (SELECT     RM_ID, RM_BCODE, RM_Datetime, RM_Location, RM_Supplier, RM_Product, RM_PurchOrd, RM_Grade, RM_Thickness, RM_Quantity,                                                      RM_Status                              FROM          PWC125.veneer.dbo.tbl_RM_Materials                              UNION ALL                              SELECT     RMid AS RM_ID, BCODE AS RM_BCODE, RMDatetime, RMLocation, RMSupplier, RMProduct, RMPo, RMGrade, RMThickness,                                                     RMQuantity, RMstatus                              FROM         PWC125.Veneer.dbo.RMaterial) AllBarcodes ON AllBarcodes.RM_BCODE = LastDate.RM_BCODE AND                         AllBarcodes.RM_Datetime = LastDate.RM_Datetime"
WADAdboRMaterial_RM_Materials.CursorType = 0
WADAdboRMaterial_RM_Materials.CursorLocation = 2
WADAdboRMaterial_RM_Materials.LockType = 1
WADAdboRMaterial_RM_Materials.Open()
 
WADAdboRMaterial_RM_Materials_numRows = 0
%>
<%
Dim rs_Location
Dim rs_Location_numRows
 
Set rs_Location = Server.CreateObject("ADODB.Recordset")
rs_Location.ActiveConnection = MM_veneermove_STRING
rs_Location.Source = "SELECT LocationNum FROM dbo.tbl_location ORDER BY LocationNum ASC"
rs_Location.CursorType = 0
rs_Location.CursorLocation = 2
rs_Location.LockType = 1
rs_Location.Open()
 
rs_Location_numRows = 0
%>
<%
Dim rs_Status
Dim rs_Status_numRows
 
Set rs_Status = Server.CreateObject("ADODB.Recordset")
rs_Status.ActiveConnection = MM_veneermove_STRING
rs_Status.Source = "SELECT status FROM dbo.tbl_status ORDER BY status_ID ASC"
rs_Status.CursorType = 0
rs_Status.CursorLocation = 2
rs_Status.LockType = 1
rs_Status.Open()
 
rs_Status_numRows = 0
%>
<%
' WA Application Builder Update
if (cStr(Request.Form("Update.x")) <> "")  then
  WA_connection = MM_veneermove_STRING
  WA_table = "dbo.RMaterial_RM_Materials"
  WA_redirectURL = "tbl_RM_Materials_Results.asp"
  WA_keepQueryString = false
  WA_indexField = "RM_ID"
  WA_fieldNamesStr = "RM_BCODE|RM_DateTime|RM_PurchOrd|RM_Location|RM_Supplier|RM_Grade|RM_Thickness|RM_Quantity|RM_Status|RM_Product"
  WA_fieldValuesStr = "" & cStr(cStr(Request.Form("RM_BCODE"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_DateTime"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_PurchOrd"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Location"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Supplier"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Grade"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Thickness"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Quantity"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Status"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Product"))) & ""
  WA_columnTypesStr = "',none,''|',none,NULL|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''"
  WA_comparisonStr = " LIKE | = | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE "
  WA_fieldNames = Split(WA_fieldNamesStr,"|")
  WA_fieldValues = Split(WA_fieldValuesStr,"|")
  WA_columns = Split(WA_columnTypesStr,"|")
  WA_comparisions = Split(WA_comparisonStr, "|")
 
  WA_where_fieldValuesStr = "" & cStr(cStr(Request.Form("WADAUpdateRecordID"))) & ""
  WA_where_columnTypesStr = "none,none,NULL"
  WA_where_comparisonStr = "="
  WA_where_fieldNames = Split(WA_indexField,"|")
  WA_where_fieldValues = Split(WA_where_fieldValuesStr,"|")
  WA_where_columns = Split(WA_where_columnTypesStr,"|")
  WA_where_comparisions = Split(WA_where_comparisonStr, "|")
  
 
  updateParamsObj = WA_AB_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, -1)
  WhereObj = WA_AB_generateWhereClause(WA_where_fieldNames, WA_where_columns, WA_where_fieldValues, WA_where_comparisions)
  
  set MM_editCmd = Server.CreateObject("ADODB.Command")
  MM_editCmd.ActiveConnection = WA_connection
  MM_editCmd.CommandText = "UPDATE " & WA_table & " SET " & updateParamsObj(3) & " WHERE " & WhereObj & ""
  MM_editCmd.Execute()
  MM_editCmd.ActiveConnection.Close()
  if (WA_redirectURL <> "")  then
    if (WA_keepQueryString AND Request.QueryString <> "" AND Request.QueryString.Count > 0) then
      if (inStr(WA_redirectURL,"?") > 0)  then
	    WA_redirectURL = WA_redirectURL & "&"
      else
	    WA_redirectURL = WA_redirectURL & "?"
	  end if
      WA_redirectURL = WA_redirectURL & Request.QueryString
    end if
    Response.Redirect(WA_redirectURL)
  end if
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Update tbl_RM_Materials</title>
<link href="WA_DataAssist/styles/Modular_Poppy.css" rel="stylesheet" type="text/css" />
<link href="WA_DataAssist/styles/Arial.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background-color: #FFE8E8;
}
.style1 {color: #FF0000}
.style2 {font-size: 16}
.style11 {color: #FF0000; font-size: 16px; }
.style14 {font-size: 18px}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
 
<body onload="document.forms['WADAUpdateForm'].RM_Location.focus();">
<body>
 
<div id="Layer1" style="position:absolute; left:400px; top:200px; width:479px; height:56px; z-index:1"> 
  <p class="WADAHeaderText style14">To update the record choose new &quot;Location&quot; &amp; &quot;Status&quot;.</p>
  <p class="WADAHeaderText style2"><span class="style11"><span class="style14">To leave the record unchanged click &quot;Cancel&quot;</span>.</span> </p>
</div>
<div id="Layer2" style="position:absolute; left:308px; top:119px; width:171px; height:22px; z-index:2"><em><strong><span class="style1">RESET &quot;LOCATION!&quot;</span></strong></em></div>
<div id="Layer3" style="position:absolute; left:311px; top:288px; width:160px; height:25px; z-index:3" class="style1"><em><strong>RESET &quot;STATUS!&quot;</strong></em></div>
<div class="WADAUpdateContainer"> 
    <form action="tbl_RM_Materials_Update.asp" method="post" name="WADAUpdateForm" id="WADAUpdateForm">
      <div class="WADAHeader">Update Record: Select new location  and press update. </div>
      <table class="WADADataTable" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <th class="WADADataTableHeader"><div align="left">BCODE:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_BCODE" id="RM_BCODE" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_BCODE").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Date Time:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_DateTime" id="RM_DateTime" value="<%response.write( now())%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"></th>
          <td class="WADADataTableCell"><input type="Hidden" readonly name="RM_PurchOrd" id="RM_PurchOrd" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_PurchOrd").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Location:</div></th>
          <td class="WADADataTableCell">
            <select name="RM_Location">
              <%
While (NOT rs_Location.EOF)
%>
              <option value="<%=(rs_Location.Fields.Item("LocationNum").Value)%>"><%=(rs_Location.Fields.Item("LocationNum").Value)%></option>
              <%
  rs_Location.MoveNext()
Wend
If (rs_Location.CursorType > 0) Then
  rs_Location.MoveFirst
Else
  rs_Location.Requery
End If
%>
          </select></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Supplier:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Supplier" id="RM_Supplier" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_Supplier").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Grade:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Grade" id="RM_Grade" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_Grade").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Thickness:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Thickness" id="RM_Thickness" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_Thickness").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Quantity:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Quantity" id="RM_Quantity" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_Quantity").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Status:</div></th>
          <td class="WADADataTableCell"><select name="RM_Status">
            <%
While (NOT rs_Status.EOF)
%>
            <option value="<%=(rs_Status.Fields.Item("status").Value)%>"><%=(rs_Status.Fields.Item("status").Value)%></option>
            <%
  rs_Status.MoveNext()
Wend
If (rs_Status.CursorType > 0) Then
  rs_Status.MoveFirst
Else
  rs_Status.Requery
End If
%>
          </select></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left"></div></th>
          <td class="WADADataTableCell"><input type="Hidden" readonly name="RM_Product" id="RM_Product" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_Product").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
      </table>
      <div class="WADAButtonRow">
        <table class="WADADataNavButtons" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td class="WADADataNavButtonCell" nowrap="nowrap"><input name="Update" type="image" id="Update" value="Update" src="WA_DataAssist/images/Poppy/Modular_update.gif" alt="Update" width="56" height="17" hspace="0" vspace="0" border="0"  /></td>
            <td class="WADADataNavButtonCell" nowrap="nowrap"><a href="tbl_RM_Materials_Results.asp"><img src="WA_DataAssist/images/Poppy/Modular_cancel.gif" alt="Cancel" name="Cancel" width="56" height="17" border="0" id="Cancel" /></a></td>
          </tr>
        </table>
        <input name="WADAUpdateRecordID" type="hidden" id="WADAUpdateRecordID" value="<%=Server.URLEncode((WADAdboRMaterial_RM_Materials.Fields.Item("RM_ID").Value))%>">
      </div>
       <% If WADAdboRMaterial_RM_Materials.EOF And WADAdboRMaterial_RM_Materials.BOF Then %>
      <div class="WADANoResults">
        <div class="WADANoResultsMessage">No record found.</div>
      </div>
      <% End If ' end WADAdboRMaterial_RM_Materials.EOF And WADAdboRMaterial_RM_Materials.BOF %>
    </form>
	  <p>  <table border="0">
    <tr>
      <td>  
	  	
  <form name="form2" method="post" action="http://localhost/tbl_RM_Materials_Results.asp">
    <input type="submit" name="Submit" value="Floor Inventory">
  </form>
  <form name="form3" method="post" action="http://localhost/tbl_RM_Materials_Insert_Scarf.asp">
    <input type="submit" name="Submit" value="Scarf Page">
  </form>
</td>
    </tr>
  </table>
&nbsp;</p>
 
</div>
</body>
</html>
<%
WADAdboRMaterial_RM_Materials.Close()
Set WADAdboRMaterial_RM_Materials = Nothing
%>
<%
rs_Location.Close()
Set rs_Location = Nothing
%>
<%
rs_Status.Close()
Set rs_Status = Nothing
%>
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
513:
514:
515:
516:
517:
518:
519:
520:
521:
522:
523:
524:
525:
526:
527:
528:
529:
530:
531:
532:
533:
534:
535:
536:
537:
538:
539:
540:
541:
542:
543:
544:
545:
546:
547:
548:
549:
550:
551:
552:
553:
554:
555:
556:
557:
558:
559:
560:
561:
562:
563:
564:
565:
566:
567:
568:
569:
570:
571:
572:
573:
574:
575:
576:
577:
578:
579:
580:
581:
582:
583:
584:
585:
586:
587:
588:
589:
590:
591:
592:
593:
594:
595:
596:
597:
598:
599:
600:
601:
602:
603:
604:
605:
606:
607:
608:
609:
610:
611:
612:
613:
614:
615:
616:
617:
618:
619:
620:
621:
622:
623:
624:
625:
626:
627:
628:
629:
630:
631:
632:
633:
634:
635:
636:
637:
638:
639:
640:
641:
642:
643:
644:
645:
646:
647:
648:
649:
650:
651:
652:
653:
654:
655:
656:
657:
658:
659:
660:
661:
662:
663:
664:
665:
666:
667:
668:
669:
670:
671:
672:
673:
674:
675:
676:
677:
678:
679:
680:
681:
682:
683:
684:
685:
686:
687:
688:
689:
690:
691:
692:
693:
694:
695:
696:
697:
698:
699:
700:
701:
702:
703:
704:
705:
706:
707:
708:
709:
710:
711:
712:
713:
714:
715:
716:
717:
718:
719:
720:
721:
722:
723:
724:
725:
726:
727:
728:
729:
730:
731:
732:
733:
734:
735:
736:
737:
738:
739:
740:
741:
742:
743:
744:
745:
746:
747:
748:
749:
750:
751:
752:
753:
754:
755:
756:
757:
758:
759:
760:
761:
762:
763:
764:
765:
766:
767:
768:
769:
770:
771:
772:
773:
774:
775:
776:
777:
778:
779:
780:
781:
782:
783:
784:
785:
786:
787:
788:
789:
790:
791:
792:
793:
794:
795:
796:
797:
798:
799:
800:
801:
802:
803:
804:
805:
806:
807:
808:
809:
810:
811:
812:
813:
814:
815:
816:
817:
818:
819:
820:
821:
822:
823:
824:
825:
826:
827:
828:
829:
830:
831:
832:
833:
834:
835:
836:
837:
838:
839:
840:
841:
842:
843:
844:
845:
846:
847:
848:
849:
850:
851:
852:
853:
854:
855:
856:
857:
858:
859:
860:
861:
862:
863:
864:
865:
866:
867:
868:
869:
870:
871:
872:
873:
874:
875:
876:
877:
878:
879:
880:
881:
882:
883:
884:
885:
886:
887:
888:
889:
890:
891:
892:
893:
894:
895:
896:
897:
898:
899:
900:
901:
902:
903:
904:
905:
906:
907:
908:
909:
910:
911:
912:
913:
914:
915:
916:
917:
918:
919:
920:
921:
922:
923:

Select allOpen in new window

 

by: SamuelClemmonsPosted on 2009-07-28 at 17:54:49ID: 24966480

I've reposted the error page so that you can easily go the line error from the error message.

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/veneermove.asp" -->
<!--#include file="WA_DataAssist/WA_AppBuilder_VB.asp" -->
<%
Dim WADAdboRMaterial_RM_Materials
Dim WADAdboRMaterial_RM_Materials_numRows
 
Set WADAdboRMaterial_RM_Materials = Server.CreateObject("ADODB.Recordset")
WADAdboRMaterial_RM_Materials.ActiveConnection = MM_veneermove_STRING
WADAdboRMaterial_RM_Materials.Source = "SELECT     AllBarcodes.*, AllBarcodes.RM_BCODE AS Expr1, AllBarcodes.RM_ID AS Expr2  FROM         (SELECT     RM_BCODE, MAX(RM_Datetime) RM_Datetime                         FROM          (SELECT     RM_BCODE, RM_Datetime                                                 FROM          PWC125.veneer.dbo.tbl_RM_Materials                                                 UNION ALL                                                 SELECT     BCODE AS RM_BCODE, RMDatetime                                                 FROM         PWC125.Veneer.dbo.RMaterial) A                         GROUP BY RM_BCODE) LastDate INNER JOIN                            (SELECT     RM_ID, RM_BCODE, RM_Datetime, RM_Location, RM_Supplier, RM_Product, RM_PurchOrd, RM_Grade, RM_Thickness, RM_Quantity,                                                      RM_Status                              FROM          PWC125.veneer.dbo.tbl_RM_Materials                              UNION ALL                              SELECT     RMid AS RM_ID, BCODE AS RM_BCODE, RMDatetime, RMLocation, RMSupplier, RMProduct, RMPo, RMGrade, RMThickness,                                                     RMQuantity, RMstatus                              FROM         PWC125.Veneer.dbo.RMaterial) AllBarcodes ON AllBarcodes.RM_BCODE = LastDate.RM_BCODE AND                         AllBarcodes.RM_Datetime = LastDate.RM_Datetime"
WADAdboRMaterial_RM_Materials.CursorType = 0
WADAdboRMaterial_RM_Materials.CursorLocation = 2
WADAdboRMaterial_RM_Materials.LockType = 1
WADAdboRMaterial_RM_Materials.Open()
 
WADAdboRMaterial_RM_Materials_numRows = 0
%>
<%
Dim rs_Location
Dim rs_Location_numRows
 
Set rs_Location = Server.CreateObject("ADODB.Recordset")
rs_Location.ActiveConnection = MM_veneermove_STRING
rs_Location.Source = "SELECT LocationNum FROM dbo.tbl_location ORDER BY LocationNum ASC"
rs_Location.CursorType = 0
rs_Location.CursorLocation = 2
rs_Location.LockType = 1
rs_Location.Open()
 
rs_Location_numRows = 0
%>
<%
Dim rs_Status
Dim rs_Status_numRows
 
Set rs_Status = Server.CreateObject("ADODB.Recordset")
rs_Status.ActiveConnection = MM_veneermove_STRING
rs_Status.Source = "SELECT status FROM dbo.tbl_status ORDER BY status_ID ASC"
rs_Status.CursorType = 0
rs_Status.CursorLocation = 2
rs_Status.LockType = 1
rs_Status.Open()
 
rs_Status_numRows = 0
%>
<%
' WA Application Builder Update
if (cStr(Request.Form("Update.x")) <> "")  then
  WA_connection = MM_veneermove_STRING
  WA_table = "dbo.RMaterial_RM_Materials"
  WA_redirectURL = "tbl_RM_Materials_Results.asp"
  WA_keepQueryString = false
  WA_indexField = "RM_ID"
  WA_fieldNamesStr = "RM_BCODE|RM_DateTime|RM_PurchOrd|RM_Location|RM_Supplier|RM_Grade|RM_Thickness|RM_Quantity|RM_Status|RM_Product"
  WA_fieldValuesStr = "" & cStr(cStr(Request.Form("RM_BCODE"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_DateTime"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_PurchOrd"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Location"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Supplier"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Grade"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Thickness"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Quantity"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Status"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Product"))) & ""
  WA_columnTypesStr = "',none,''|',none,NULL|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''"
  WA_comparisonStr = " LIKE | = | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE "
  WA_fieldNames = Split(WA_fieldNamesStr,"|")
  WA_fieldValues = Split(WA_fieldValuesStr,"|")
  WA_columns = Split(WA_columnTypesStr,"|")
  WA_comparisions = Split(WA_comparisonStr, "|")
 
  WA_where_fieldValuesStr = "" & cStr(cStr(Request.Form("WADAUpdateRecordID"))) & ""
  WA_where_columnTypesStr = "none,none,NULL"
  WA_where_comparisonStr = "="
  WA_where_fieldNames = Split(WA_indexField,"|")
  WA_where_fieldValues = Split(WA_where_fieldValuesStr,"|")
  WA_where_columns = Split(WA_where_columnTypesStr,"|")
  WA_where_comparisions = Split(WA_where_comparisonStr, "|")
  
 
  updateParamsObj = WA_AB_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, -1)
  WhereObj = WA_AB_generateWhereClause(WA_where_fieldNames, WA_where_columns, WA_where_fieldValues, WA_where_comparisions)
  
  set MM_editCmd = Server.CreateObject("ADODB.Command")
  MM_editCmd.ActiveConnection = WA_connection
  MM_editCmd.CommandText = "UPDATE " & WA_table & " SET " & updateParamsObj(3) & " WHERE " & WhereObj & ""
  MM_editCmd.Execute()
  MM_editCmd.ActiveConnection.Close()
  if (WA_redirectURL <> "")  then
    if (WA_keepQueryString AND Request.QueryString <> "" AND Request.QueryString.Count > 0) then
      if (inStr(WA_redirectURL,"?") > 0)  then
	    WA_redirectURL = WA_redirectURL & "&"
      else
	    WA_redirectURL = WA_redirectURL & "?"
	  end if
      WA_redirectURL = WA_redirectURL & Request.QueryString
    end if
    Response.Redirect(WA_redirectURL)
  end if
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Update tbl_RM_Materials</title>
<link href="WA_DataAssist/styles/Modular_Poppy.css" rel="stylesheet" type="text/css" />
<link href="WA_DataAssist/styles/Arial.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background-color: #FFE8E8;
}
.style1 {color: #FF0000}
.style2 {font-size: 16}
.style11 {color: #FF0000; font-size: 16px; }
.style14 {font-size: 18px}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
 
<body onload="document.forms['WADAUpdateForm'].RM_Location.focus();">
<body>
 
<div id="Layer1" style="position:absolute; left:400px; top:200px; width:479px; height:56px; z-index:1"> 
  <p class="WADAHeaderText style14">To update the record choose new &quot;Location&quot; &amp; &quot;Status&quot;.</p>
  <p class="WADAHeaderText style2"><span class="style11"><span class="style14">To leave the record unchanged click &quot;Cancel&quot;</span>.</span> </p>
</div>
<div id="Layer2" style="position:absolute; left:308px; top:119px; width:171px; height:22px; z-index:2"><em><strong><span class="style1">RESET &quot;LOCATION!&quot;</span></strong></em></div>
<div id="Layer3" style="position:absolute; left:311px; top:288px; width:160px; height:25px; z-index:3" class="style1"><em><strong>RESET &quot;STATUS!&quot;</strong></em></div>
<div class="WADAUpdateContainer"> 
    <form action="tbl_RM_Materials_Update.asp" method="post" name="WADAUpdateForm" id="WADAUpdateForm">
      <div class="WADAHeader">Update Record: Select new location  and press update. </div>
      <table class="WADADataTable" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <th class="WADADataTableHeader"><div align="left">BCODE:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_BCODE" id="RM_BCODE" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_BCODE").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Date Time:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_DateTime" id="RM_DateTime" value="<%response.write( now())%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"></th>
          <td class="WADADataTableCell"><input type="Hidden" readonly name="RM_PurchOrd" id="RM_PurchOrd" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_PurchOrd").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Location:</div></th>
          <td class="WADADataTableCell">
            <select name="RM_Location">
              <%
While (NOT rs_Location.EOF)
%>
              <option value="<%=(rs_Location.Fields.Item("LocationNum").Value)%>"><%=(rs_Location.Fields.Item("LocationNum").Value)%></option>
              <%
  rs_Location.MoveNext()
Wend
If (rs_Location.CursorType > 0) Then
  rs_Location.MoveFirst
Else
  rs_Location.Requery
End If
%>
          </select></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Supplier:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Supplier" id="RM_Supplier" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_Supplier").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Grade:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Grade" id="RM_Grade" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_Grade").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Thickness:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Thickness" id="RM_Thickness" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_Thickness").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Quantity:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Quantity" id="RM_Quantity" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_Quantity").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Status:</div></th>
          <td class="WADADataTableCell"><select name="RM_Status">
            <%
While (NOT rs_Status.EOF)
%>
            <option value="<%=(rs_Status.Fields.Item("status").Value)%>"><%=(rs_Status.Fields.Item("status").Value)%></option>
            <%
  rs_Status.MoveNext()
Wend
If (rs_Status.CursorType > 0) Then
  rs_Status.MoveFirst
Else
  rs_Status.Requery
End If
%>
          </select></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left"></div></th>
          <td class="WADADataTableCell"><input type="Hidden" readonly name="RM_Product" id="RM_Product" value="<%=Replace((WADAdboRMaterial_RM_Materials.Fields.Item("RM_Product").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
      </table>
      <div class="WADAButtonRow">
        <table class="WADADataNavButtons" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td class="WADADataNavButtonCell" nowrap="nowrap"><input name="Update" type="image" id="Update" value="Update" src="WA_DataAssist/images/Poppy/Modular_update.gif" alt="Update" width="56" height="17" hspace="0" vspace="0" border="0"  /></td>
            <td class="WADADataNavButtonCell" nowrap="nowrap"><a href="tbl_RM_Materials_Results.asp"><img src="WA_DataAssist/images/Poppy/Modular_cancel.gif" alt="Cancel" name="Cancel" width="56" height="17" border="0" id="Cancel" /></a></td>
          </tr>
        </table>
        <input name="WADAUpdateRecordID" type="hidden" id="WADAUpdateRecordID" value="<%=Server.URLEncode((WADAdboRMaterial_RM_Materials.Fields.Item("RM_ID").Value))%>">
      </div>
       <% If WADAdboRMaterial_RM_Materials.EOF And WADAdboRMaterial_RM_Materials.BOF Then %>
      <div class="WADANoResults">
        <div class="WADANoResultsMessage">No record found.</div>
      </div>
      <% End If ' end WADAdboRMaterial_RM_Materials.EOF And WADAdboRMaterial_RM_Materials.BOF %>
    </form>
	  <p>  <table border="0">
    <tr>
      <td>  
	  	
  <form name="form2" method="post" action="http://localhost/tbl_RM_Materials_Results.asp">
    <input type="submit" name="Submit" value="Floor Inventory">
  </form>
  <form name="form3" method="post" action="http://localhost/tbl_RM_Materials_Insert_Scarf.asp">
    <input type="submit" name="Submit" value="Scarf Page">
  </form>
</td>
    </tr>
  </table>
&nbsp;</p>
 
</div>
</body>
</html>
<%
WADAdboRMaterial_RM_Materials.Close()
Set WADAdboRMaterial_RM_Materials = Nothing
%>
<%
rs_Location.Close()
Set rs_Location = Nothing
%>
<%
rs_Status.Close()
Set rs_Status = Nothing
%>
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:

Select allOpen in new window

 

by: rcmbPosted on 2009-07-28 at 18:26:01ID: 24966583

Is this a view "dbo.RMaterial_RM_Materials"

You cannot update a view...you must update the actual table.

the definiton of column 'Expr2' of view '[RMaterial_RM_Materials]' is used by another view column.

This indicates you have the Expr2 used twice within a view....look at the actual sql statement in sql and change the second to Expr3 if it has not been used.

 

by: SamuelClemmonsPosted on 2009-07-30 at 01:28:41ID: 24977694

Just tried changing "Expr2" to "Expr3" and I get the exact same error except for the "Expr3".

I just noticed something else. Once I retreive a record in the results page using the search field and I press the Update button I go to the Update page but the page is looking at the wrong database. It is not looking at the "view" but it is seeing the table: "tbl_RM_Materials database".

It needs to receive the data held in the form fields from "tbl_RM_Materials_Results.asp" which came from the "view" "RMaterial_RM_Materials"

I am working the night shift until next Monday. So I will check this at night and respond.

 

by: SamuelClemmonsPosted on 2009-08-03 at 10:52:16ID: 25006696

rcmb,
I'm back on day shift and ready to resume, are you still there?

 

by: DanielWilsonPosted on 2009-08-04 at 10:27:16ID: 25016057

can you post the code of the view?

 

by: SamuelClemmonsPosted on 2009-08-04 at 13:19:15ID: 25017733

This is the code of the view

SELECT     AllBarcodes.*, AllBarcodes.RM_BCODE AS Expr1, AllBarcodes.RM_ID AS Expr3
FROM         (SELECT     RM_BCODE, MAX(RM_Datetime) RM_Datetime
                       FROM          (SELECT     RM_BCODE, RM_Datetime
                                               FROM          PWC125.veneer.dbo.tbl_RM_Materials
                                               UNION ALL
                                               SELECT     BCODE AS RM_BCODE, RMDatetime
                                               FROM         PWC125.Veneer.dbo.RMaterial) A
                       GROUP BY RM_BCODE) LastDate INNER JOIN
                          (SELECT     RM_ID, RM_BCODE, RM_Datetime, RM_Location, RM_Supplier, RM_Product, RM_PurchOrd, RM_Grade, RM_Thickness, RM_Quantity, 
                                                   RM_Status
                            FROM          PWC125.veneer.dbo.tbl_RM_Materials
                            UNION ALL
                            SELECT     RMid AS RM_ID, BCODE AS RM_BCODE, RMDatetime, RMLocation, RMSupplier, RMProduct, RMPo, RMGrade, RMThickness, 
                                                  RMQuantity, RMstatus
                            FROM         PWC125.Veneer.dbo.RMaterial) AllBarcodes ON AllBarcodes.RM_BCODE = LastDate.RM_BCODE AND 
                      AllBarcodes.RM_Datetime = LastDate.RM_Datetime

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:

Select allOpen in new window

 

by: SamuelClemmonsPosted on 2009-08-04 at 13:21:56ID: 25017757

This is the code of the results page

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/veneermove.asp" -->
<!--#include file="WA_DataAssist/WA_AppBuilder_VB.asp" -->
<%
If Session("dbotbl_RM_Materials_Results_QueryString") <> "" AND Request.ServerVariables("QUERY_STRING") = "" Then
Response.Redirect("tbl_RM_Materials_Results.asp?" & Session("dbotbl_RM_Materials_Results_QueryString"))
Else
Session("dbotbl_RM_Materials_Results_QueryString") = Request.QueryString
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_BCODE
WADAdbotbl_RM_Materials__ParamRM_BCODE = "-1"
If (cStr(Request("S_RM_BCODE")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_BCODE = cStr(Request("S_RM_BCODE"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_DateTime
WADAdbotbl_RM_Materials__ParamRM_DateTime = "1/1/1"
If (cStr(Request("S_RM_DateTime")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_DateTime = cStr(Request("S_RM_DateTime"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_PurchOrd
WADAdbotbl_RM_Materials__ParamRM_PurchOrd = "-1"
If (cStr(Request("S_RM_PurchOrd")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_PurchOrd = cStr(Request("S_RM_PurchOrd"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Location
WADAdbotbl_RM_Materials__ParamRM_Location = "-1"
If (cStr(Request("S_RM_Location")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Location = cStr(Request("S_RM_Location"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Supplier
WADAdbotbl_RM_Materials__ParamRM_Supplier = "-1"
If (cStr(Request("S_RM_Supplier")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Supplier = cStr(Request("S_RM_Supplier"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Grade
WADAdbotbl_RM_Materials__ParamRM_Grade = "-1"
If (cStr(Request("S_RM_Grade")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Grade = cStr(Request("S_RM_Grade"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Thickness
WADAdbotbl_RM_Materials__ParamRM_Thickness = "-1"
If (cStr(Request("S_RM_Thickness")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Thickness = cStr(Request("S_RM_Thickness"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Quantity
WADAdbotbl_RM_Materials__ParamRM_Quantity = "-1"
If (cStr(Request("S_RM_Quantity")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Quantity = cStr(Request("S_RM_Quantity"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Status
WADAdbotbl_RM_Materials__ParamRM_Status = "-1"
If (cStr(Request("S_RM_Status")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Status = cStr(Request("S_RM_Status"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials__ParamRM_Product
WADAdbotbl_RM_Materials__ParamRM_Product = "-1"
If (cStr(Request("S_RM_Product")) <> "") Then 
  WADAdbotbl_RM_Materials__ParamRM_Product = cStr(Request("S_RM_Product"))
End If
%>
<%
Dim WADAdbotbl_RM_Materials
Dim WADAdbotbl_RM_Materials_numRows
 
Set WADAdbotbl_RM_Materials = Server.CreateObject("ADODB.Recordset")
WADAdbotbl_RM_Materials.ActiveConnection = MM_veneermove_STRING
WADAdbotbl_RM_Materials.Source = "SELECT *  FROM dbo.RMaterial_RM_Materials  WHERE (RM_BCODE LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_BCODE, "'", "''") + "') AND (RM_DateTime = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "' OR '1/1/1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_DateTime, "'", "''") + "') AND (RM_PurchOrd LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_PurchOrd, "'", "''") + "') AND (RM_Location LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Location, "'", "''") + "') AND (RM_Supplier LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Supplier, "'", "''") + "') AND (RM_Grade LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Grade, "'", "''") + "') AND (RM_Thickness LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Thickness, "'", "''") + "') AND (RM_Quantity LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Quantity, "'", "''") + "') AND (RM_Status LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Status, "'", "''") + "') AND (RM_Product LIKE '%" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "%' OR '-1' = '" + Replace(WADAdbotbl_RM_Materials__ParamRM_Product, "'", "''") + "')  ORDER BY RM_DateTime DESC"
WADAdbotbl_RM_Materials.CursorType = 0
WADAdbotbl_RM_Materials.CursorLocation = 2
WADAdbotbl_RM_Materials.LockType = 1
WADAdbotbl_RM_Materials.Open()
 
WADAdbotbl_RM_Materials_numRows = 0
%>
<%
Dim WADAdbotbl_RM_Materials_1__numRows
Dim WADAdbotbl_RM_Materials_1__index
 
WADAdbotbl_RM_Materials_1__numRows = 1
WADAdbotbl_RM_Materials_1__index = 0
WADAdbotbl_RM_Materials_numRows = WADAdbotbl_RM_Materials_numRows + WADAdbotbl_RM_Materials_1__numRows
%>
<%
'  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
 
Dim WADAdbotbl_RM_Materials_total
Dim WADAdbotbl_RM_Materials_first
Dim WADAdbotbl_RM_Materials_last
 
' set the record count
WADAdbotbl_RM_Materials_total = WADAdbotbl_RM_Materials.RecordCount
 
' set the number of rows displayed on this page
If (WADAdbotbl_RM_Materials_numRows < 0) Then
  WADAdbotbl_RM_Materials_numRows = WADAdbotbl_RM_Materials_total
Elseif (WADAdbotbl_RM_Materials_numRows = 0) Then
  WADAdbotbl_RM_Materials_numRows = 1
End If
 
' set the first and last displayed record
WADAdbotbl_RM_Materials_first = 1
WADAdbotbl_RM_Materials_last  = WADAdbotbl_RM_Materials_first + WADAdbotbl_RM_Materials_numRows - 1
 
' if we have the correct record count, check the other stats
If (WADAdbotbl_RM_Materials_total <> -1) Then
  If (WADAdbotbl_RM_Materials_first > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_first = WADAdbotbl_RM_Materials_total
  End If
  If (WADAdbotbl_RM_Materials_last > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_last = WADAdbotbl_RM_Materials_total
  End If
  If (WADAdbotbl_RM_Materials_numRows > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_numRows = WADAdbotbl_RM_Materials_total
  End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
 
If (WADAdbotbl_RM_Materials_total = -1) Then
 
  ' count the total records by iterating through the recordset
  WADAdbotbl_RM_Materials_total=0
  While (Not WADAdbotbl_RM_Materials.EOF)
    WADAdbotbl_RM_Materials_total = WADAdbotbl_RM_Materials_total + 1
    WADAdbotbl_RM_Materials.MoveNext
  Wend
 
  ' reset the cursor to the beginning
  If (WADAdbotbl_RM_Materials.CursorType > 0) Then
    WADAdbotbl_RM_Materials.MoveFirst
  Else
    WADAdbotbl_RM_Materials.Requery
  End If
 
  ' set the number of rows displayed on this page
  If (WADAdbotbl_RM_Materials_numRows < 0 Or WADAdbotbl_RM_Materials_numRows > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_numRows = WADAdbotbl_RM_Materials_total
  End If
 
  ' set the first and last displayed record
  WADAdbotbl_RM_Materials_first = 1
  WADAdbotbl_RM_Materials_last = WADAdbotbl_RM_Materials_first + WADAdbotbl_RM_Materials_numRows - 1
  
  If (WADAdbotbl_RM_Materials_first > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_first = WADAdbotbl_RM_Materials_total
  End If
  If (WADAdbotbl_RM_Materials_last > WADAdbotbl_RM_Materials_total) Then
    WADAdbotbl_RM_Materials_last = WADAdbotbl_RM_Materials_total
  End If
 
End If
%>
<%
Dim MM_paramName 
%>
<%
' *** Move To Record and Go To Record: declare variables
 
Dim MM_rs
Dim MM_rsCount
Dim MM_size
Dim MM_uniqueCol
Dim MM_offset
Dim MM_atTotal
Dim MM_paramIsDefined
 
Dim MM_param
Dim MM_index
 
Set MM_rs    = WADAdbotbl_RM_Materials
MM_rsCount   = WADAdbotbl_RM_Materials_total
MM_size      = WADAdbotbl_RM_Materials_numRows
MM_uniqueCol = ""
MM_paramName = ""
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName <> "") Then
  MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
End If
%>
<%
' *** Move To Record: handle 'index' or 'offset' parameter
 
if (Not MM_paramIsDefined And MM_rsCount <> 0) then
 
  ' use index parameter if defined, otherwise use offset parameter
  MM_param = Request.QueryString("index")
  If (MM_param = "") Then
    MM_param = Request.QueryString("offset")
  End If
  If (MM_param <> "") Then
    MM_offset = Int(MM_param)
  End If
 
  ' if we have a record count, check if we are past the end of the recordset
  If (MM_rsCount <> -1) Then
    If (MM_offset >= MM_rsCount Or MM_offset = -1) Then  ' past end or move last
      If ((MM_rsCount Mod MM_size) > 0) Then         ' last page not a full repeat region
        MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
      Else
        MM_offset = MM_rsCount - MM_size
      End If
    End If
  End If
 
  ' move the cursor to the selected record
  MM_index = 0
  While ((Not MM_rs.EOF) And (MM_index < MM_offset Or MM_offset = -1))
    MM_rs.MoveNext
    MM_index = MM_index + 1
  Wend
  If (MM_rs.EOF) Then 
    MM_offset = MM_index  ' set MM_offset to the last possible record
  End If
 
End If
%>
<%
' *** Move To Record: if we dont know the record count, check the display range
 
If (MM_rsCount = -1) Then
 
  ' walk to the end of the display range for this page
  MM_index = MM_offset
  While (Not MM_rs.EOF And (MM_size < 0 Or MM_index < MM_offset + MM_size))
    MM_rs.MoveNext
    MM_index = MM_index + 1
  Wend
 
  ' if we walked off the end of the recordset, set MM_rsCount and MM_size
  If (MM_rs.EOF) Then
    MM_rsCount = MM_index
    If (MM_size < 0 Or MM_size > MM_rsCount) Then
      MM_size = MM_rsCount
    End If
  End If
 
  ' if we walked off the end, set the offset based on page size
  If (MM_rs.EOF And Not MM_paramIsDefined) Then
    If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
      If ((MM_rsCount Mod MM_size) > 0) Then
        MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
      Else
        MM_offset = MM_rsCount - MM_size
      End If
    End If
  End If
 
  ' reset the cursor to the beginning
  If (MM_rs.CursorType > 0) Then
    MM_rs.MoveFirst
  Else
    MM_rs.Requery
  End If
 
  ' move the cursor to the selected record
  MM_index = 0
  While (Not MM_rs.EOF And MM_index < MM_offset)
    MM_rs.MoveNext
    MM_index = MM_index + 1
  Wend
End If
%>
<%
' *** Move To Record: update recordset stats
 
' set the first and last displayed record
WADAdbotbl_RM_Materials_first = MM_offset + 1
WADAdbotbl_RM_Materials_last  = MM_offset + MM_size
 
If (MM_rsCount <> -1) Then
  If (WADAdbotbl_RM_Materials_first > MM_rsCount) Then
    WADAdbotbl_RM_Materials_first = MM_rsCount
  End If
  If (WADAdbotbl_RM_Materials_last > MM_rsCount) Then
    WADAdbotbl_RM_Materials_last = MM_rsCount
  End If
End If
 
' set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
 
Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth
 
Dim MM_removeList
Dim MM_item
Dim MM_nextItem
 
' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
  MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If
 
MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""
 
' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
  End If
Next
 
' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
  End If
Next
 
' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then 
  MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "")  Then
  MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
  MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If
 
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>
<%
' *** Move To Record: set the strings for the first, last, next, and previous links
 
Dim MM_keepMove
Dim MM_moveParam
Dim MM_moveFirst
Dim MM_moveLast
Dim MM_moveNext
Dim MM_movePrev
 
Dim MM_urlStr
Dim MM_paramList
Dim MM_paramIndex
Dim MM_nextParam
 
MM_keepMove = MM_keepBoth
MM_moveParam = "index"
 
' if the page has a repeated region, remove 'offset' from the maintained parameters
If (MM_size > 1) Then
  MM_moveParam = "offset"
  If (MM_keepMove <> "") Then
    MM_paramList = Split(MM_keepMove, "&")
    MM_keepMove = ""
    For MM_paramIndex = 0 To UBound(MM_paramList)
      MM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=") - 1)
      If (StrComp(MM_nextParam,MM_moveParam,1) <> 0) Then
        MM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex)
      End If
    Next
    If (MM_keepMove <> "") Then
      MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
    End If
  End If
End If
 
' set the strings for the move to links
If (MM_keepMove <> "") Then 
  MM_keepMove = Server.HTMLEncode(MM_keepMove) & "&"
End If
 
MM_urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="
 
MM_moveFirst = MM_urlStr & "0"
MM_moveLast  = MM_urlStr & "-1"
MM_moveNext  = MM_urlStr & CStr(MM_offset + MM_size)
If (MM_offset - MM_size < 0) Then
  MM_movePrev = MM_urlStr & "0"
Else
  MM_movePrev = MM_urlStr & CStr(MM_offset - MM_size)
End If
%>
<%
'WA AltClass Iterator
class WA_AltClassIterator
  public ClassArray
  public ClassCounter
end class
 
function WA_AltClassIterator_getClass(loopObj, incrementClass) 
  if (UBound(loopObj.ClassArray) = 0) then
    WA_AltClassIterator_getClass = ""
    exit function
  end if
  if (incrementClass) then
    if (loopObj.ClassCounter > UBound(loopObj.ClassArray)) then
      loopObj.ClassCounter = 0
    end if
    loopObj.ClassCounter = loopObj.ClassCounter + 1
  end if
  if (loopObj.ClassCounter > 0) then
    WA_AltClassIterator_getClass = loopObj.ClassArray(loopObj.ClassCounter-1)
  else
    WA_AltClassIterator_getClass = loopObj.ClassArray(0)
  end if
end function
%>
<%
'WA Alternating Class
Dim WARRT_AltClass1
Set WARRT_AltClass1 = new WA_AltClassIterator
WARRT_AltClass1.ClassCounter = 0
WARRT_AltClass1.ClassArray = Split("WADAResultsRowDark|", "|")
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Results tbl_RM_Materials</title>
<link href="WA_DataAssist/styles/Modular_Pacifica.css" rel="stylesheet" type="text/css" />
<link href="WA_DataAssist/styles/Arial.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background-color: #95CAFF;
}
.style1 {font-size: 14px}
a:link {
	color: #1E23F9;
}
a:visited {
	color: #D80FDC;
}
a:hover {
	color: #000000;
}
a:active {
	color: #FF0000;
}
-->
</style></head>
 
<body>
 
<body onload="document.forms['WADASearchForm'].S_RM_BCODE.focus();">
 
<div class="WADASearchContainer">
  <form action="tbl_RM_Materials_Results.asp" method="get" name="WADASearchForm" id="WADASearchForm">
    <div class="WADAHeader style1">SCAN BAR CODE TO RETREIVE FROM FLOOR INVENTORY</div>
    <table class="WADADataTable" cellpadding="0" cellspacing="0" border="0">
      <tr>
        <th class="WADADataTableHeader"><div align="left">BCODE:</div></th>
        <td class="WADADataTableCell"><input type="text" name="S_RM_BCODE" id="S_RM_BCODE" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_DateTime" id="S_RM_DateTime" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_PurchOrd" id="S_RM_PurchOrd" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Location" id="S_RM_Location" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Supplier" id="S_RM_Supplier" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Grade" id="S_RM_Grade" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Thickness" id="S_RM_Thickness" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Quantity" id="S_RM_Quantity" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Status" id="S_RM_Status" value="" size="20" /></td>
      </tr>
      <tr>
        <th class="WADADataTableHeader"><div align="left"></div></th>
        <td class="WADADataTableCell"><input type="hidden" name="S_RM_Product" id="S_RM_Product" value="" size="20" /></td>
      </tr>
    </table>
    <table width="620" border="0" align="right">
      <tr>
        <td>  <% If Not WADAdbotbl_RM_Materials.EOF Or Not WADAdbotbl_RM_Materials.BOF Then %>
  <div class="WADAResults">
    <div class="WADAResultsNavigation">
      <div class="WADAResultsCount">Records <%=(WADAdbotbl_RM_Materials_first)%> to <%=(WADAdbotbl_RM_Materials_last)%> of <%=(WADAdbotbl_RM_Materials_total)%></div>
      <div class="WADAResultsNavTop">
        <table border="0" cellpadding="0" cellspacing="0" class="WADAResultsNavTable">
          <tr valign="middle">
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If MM_offset <> 0 Then %><a href="<%=MM_moveFirst%>" ><img src="WA_DataAssist/images/Pacifica/Modular_firsttxt.gif" alt="First" name="First" width="56" height="17" border="0" id="First" /></a>
                  <% End If ' end MM_offset <> 0 %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If MM_offset <> 0 Then %><a href="<%=MM_movePrev%>" ><img src="WA_DataAssist/images/Pacifica/Modular_previoustxt.gif" alt="Previous" name="Previous" width="56" height="17" border="0" id="Previous" /></a>
                  <% End If ' end MM_offset <> 0 %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If Not MM_atTotal Then %><a href="<%=MM_moveNext%>" ><img src="WA_DataAssist/images/Pacifica/Modular_nexttxt.gif" alt="Next" name="Next" width="56" height="17" border="0" id="Next" /></a>
                  <% End If ' end Not MM_atTotal %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If Not MM_atTotal Then %><a href="<%=MM_moveLast%>" ><img src="WA_DataAssist/images/Pacifica/Modular_lasttxt.gif" alt="Last" name="Last" width="56" height="17" border="0" id="Last" /></a>
                  <% End If ' end Not MM_atTotal %></td>
          </tr>
        </table>
      </div>
      <div class="WADAResultsInsertButton">  </div>
    </div>
    <table class="WADAResultsTable" border="1" cellpadding="1" cellspacing="1">
      <% 
While ((WADAdbotbl_RM_Materials_1__numRows <> 0) AND (NOT WADAdbotbl_RM_Materials.EOF)) 
%>
      <tr class="<%=WA_AltClassIterator_getClass(WARRT_AltClass1,true)%>">
	  	<tr>
	    <th class="WADAResultsTableHeader">BCODE:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_BCODE").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Date Time:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_DateTime").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Purchase Order:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_PurchOrd").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Location:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Location").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Supplier:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Supplier").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Grade:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Grade").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Thickness:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Thickness").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Quantity:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Quantity").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Status:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Status").Value)%></td>
		</tr>
		<tr>
		<th class="WADAResultsTableHeader">Product:</th>
        <td class="WADAResultsTableCell"><%=(WADAdbotbl_RM_Materials.Fields.Item("RM_Product").Value)%></td>
		</tr>
		<th></th>
        <td class="WADAResultsEditButtons" nowrap="nowrap"><table class="WADAEditButton_Table">
            <tr>
              <td></td>
              <td><a href="tbl_RM_Materials_Update.asp"><img src="WA_DataAssist/images/Pacifica/Modular_update.gif" alt="Update" name="Update" width="56" height="17" border="0" id="Update" /></a></td>
              <td></td>
            </tr>
        </table></td>
      </tr>
      <% 
  WADAdbotbl_RM_Materials_1__index=WADAdbotbl_RM_Materials_1__index+1
  WADAdbotbl_RM_Materials_1__numRows=WADAdbotbl_RM_Materials_1__numRows-1
  WADAdbotbl_RM_Materials.MoveNext()
Wend
%>
    </table>
    <div class="WADAResultsNavigation">
      <div class="WADAResultsCount">Records <%=(WADAdbotbl_RM_Materials_first)%> to <%=(WADAdbotbl_RM_Materials_last)%> of <%=(WADAdbotbl_RM_Materials_total)%></div>
      <div class="WADAResultsNavBottom">
        <table border="0" cellpadding="0" cellspacing="0" class="WADAResultsNavTable">
          <tr valign="middle">
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If MM_offset <> 0 Then %><a href="<%=MM_moveFirst%>" ><img src="WA_DataAssist/images/Pacifica/Modular_firsttxt.gif" alt="First" name="First" width="56" height="17" border="0" id="First" /></a>
                  <% End If ' end MM_offset <> 0 %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If MM_offset <> 0 Then %><a href="<%=MM_movePrev%>" ><img src="WA_DataAssist/images/Pacifica/Modular_previoustxt.gif" alt="Previous" name="Previous" width="56" height="17" border="0" id="Previous" /></a>
                  <% End If ' end MM_offset <> 0 %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If Not MM_atTotal Then %><a href="<%=MM_moveNext%>" ><img src="WA_DataAssist/images/Pacifica/Modular_nexttxt.gif" alt="Next" name="Next" width="56" height="17" border="0" id="Next" /></a>
                  <% End If ' end Not MM_atTotal %></td>
            <td class="WADAResultsNavButtonCell" nowrap="nowrap"><% If Not MM_atTotal Then %><a href="<%=MM_moveLast%>" ><img src="WA_DataAssist/images/Pacifica/Modular_lasttxt.gif" alt="Last" name="Last" width="56" height="17" border="0" id="Last" /></a>
                  <% End If ' end Not MM_atTotal %></td>
          </tr>
        </table>
      </div>
    </div>
  </div>
  <% End If ' end Not WADAdbotbl_RM_Materials.EOF Or NOT WADAdbotbl_RM_Materials.BOF %> <% If WADAdbotbl_RM_Materials.EOF And WADAdbotbl_RM_Materials.BOF Then %>
  <div class="WADANoResults">
    <div class="WADANoResultsMessage">No results for your search</div>
    <div> <a href="tbl_RM_Materials_Insert_Scarf.asp"><img border="0" name="Insert" id="Insert" alt="Insert" src="WA_DataAssist/images/Pacifica/Modular_insert.gif" /></a> </div>
  </div>
<% End If ' end WADAdbotbl_RM_Materials.EOF And WADAdbotbl_RM_Materials.BOF %> 
</td>
      </tr>
    </table>
    <div class="WADAButtonRow">
      <table class="WADADataNavButtons" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td class="WADADataNavButtonCell" nowrap="nowrap"><input name="Search" type="image" id="Search" value="Search" src="WA_DataAssist/images/Pacifica/Modular_search.gif" alt="Search" width="56" height="17" hspace="0" vspace="0" border="0"  /></td>
        </tr>
      </table>
    </div>
  </form>
</div>
<div class="WADAResultsContainer">
  <div class="WADAResultsHeader">
    <div class="WADAHeaderText">
	
  
  <form name="form3" method="post" action="http://localhost/tbl_RM_Materials_Insert_Scarf.asp">
    <input type="submit" name="Submit" value="Raw Materials">
  </form>
  <p>PRESS UPDATE TO CHANGE LOCATION OR MAKE CORRECTIONS</p>
  <p><a href="FloorMov_Instruc.htm" class="WADAHeaderText">Page Instructions</a> </p>
  <p><a href="NewUpdatePage.asp">PageLink</a></p>
    </div>
  </div>
</body>
</html>
<%
WADAdbotbl_RM_Materials.Close()
Set WADAdbotbl_RM_Materials = Nothing
%>
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
513:
514:
515:
516:
517:
518:
519:
520:
521:
522:
523:
524:
525:
526:
527:
528:
529:
530:
531:
532:
533:
534:
535:
536:
537:
538:
539:
540:
541:
542:
543:
544:
545:
546:
547:
548:
549:
550:
551:
552:
553:
554:
555:
556:
557:
558:
559:
560:
561:
562:
563:
564:
565:
566:
567:
568:
569:
570:
571:
572:
573:
574:
575:
576:
577:
578:
579:
580:
581:
582:
583:
584:
585:
586:
587:
588:
589:
590:
591:
592:
593:
594:
595:
596:
597:
598:
599:
600:
601:
602:
603:
604:
605:
606:
607:
608:
609:
610:
611:
612:
613:
614:
615:
616:
617:
618:
619:
620:
621:
622:
623:
624:
625:
626:
627:
628:
629:
630:
631:
632:
633:
634:
635:
636:
637:
638:
639:
640:
641:
642:
643:
644:
645:
646:
647:
648:
649:
650:
651:
652:
653:
654:
655:
656:
657:
658:
659:
660:
661:
662:
663:

Select allOpen in new window

 

by: SamuelClemmonsPosted on 2009-08-04 at 13:23:09ID: 25017766

This is the code of the update page as it exist now it has been changed a bit since the last submission

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/veneermove.asp" -->
<!--#include file="WA_DataAssist/WA_AppBuilder_VB.asp" -->
<%
Dim WADAdbotbl_RM_Materials
Dim WADAdbotbl_RM_Materials_numRows
 
Set WADAdbotbl_RM_Materials = Server.CreateObject("ADODB.Recordset")
WADAdbotbl_RM_Materials.ActiveConnection = MM_veneermove_STRING
WADAdbotbl_RM_Materials.Source = "SELECT     AllBarcodes.*, AllBarcodes.RM_BCODE AS Expr1, AllBarcodes.RM_ID AS Expr2  FROM         (SELECT     RM_BCODE, MAX(RM_Datetime) RM_Datetime                         FROM          (SELECT     RM_BCODE, RM_Datetime                                                 FROM          PWC125.veneer.dbo.tbl_RM_Materials                                                 UNION ALL                                                 SELECT     BCODE AS RM_BCODE, RMDatetime                                                 FROM         PWC125.Veneer.dbo.RMaterial) A                         GROUP BY RM_BCODE) LastDate INNER JOIN                            (SELECT     RM_ID, RM_BCODE, RM_Datetime, RM_Location, RM_Supplier, RM_Product, RM_PurchOrd, RM_Grade, RM_Thickness, RM_Quantity,                                                      RM_Status                              FROM          PWC125.veneer.dbo.tbl_RM_Materials                              UNION ALL                              SELECT     RMid AS RM_ID, BCODE AS RM_BCODE, RMDatetime, RMLocation, RMSupplier, RMProduct, RMPo, RMGrade, RMThickness,                                                     RMQuantity, RMstatus                              FROM         PWC125.Veneer.dbo.RMaterial) AllBarcodes ON AllBarcodes.RM_BCODE = LastDate.RM_BCODE AND                         AllBarcodes.RM_Datetime = LastDate.RM_Datetime"
WADAdbotbl_RM_Materials.CursorType = 0
WADAdbotbl_RM_Materials.CursorLocation = 2
WADAdbotbl_RM_Materials.LockType = 1
WADAdbotbl_RM_Materials.Open()
 
WADAdbotbl_RM_Materials_numRows = 0
%>
<%
Dim rs_Location
Dim rs_Location_numRows
 
Set rs_Location = Server.CreateObject("ADODB.Recordset")
rs_Location.ActiveConnection = MM_veneermove_STRING
rs_Location.Source = "SELECT LocationNum FROM dbo.tbl_location ORDER BY LocationNum ASC"
rs_Location.CursorType = 0
rs_Location.CursorLocation = 2
rs_Location.LockType = 1
rs_Location.Open()
 
rs_Location_numRows = 0
%>
<%
Dim rs_Status
Dim rs_Status_numRows
 
Set rs_Status = Server.CreateObject("ADODB.Recordset")
rs_Status.ActiveConnection = MM_veneermove_STRING
rs_Status.Source = "SELECT status FROM dbo.tbl_status ORDER BY status_ID ASC"
rs_Status.CursorType = 0
rs_Status.CursorLocation = 2
rs_Status.LockType = 1
rs_Status.Open()
 
rs_Status_numRows = 0
%>
<%
' WA Application Builder Update
if (cStr(Request.Form("Update.x")) <> "")  then
  WA_connection = MM_veneermove_STRING
  WA_table = "dbo.tbl_RM_Materials"
  WA_redirectURL = "tbl_RM_Materials_Results.asp"
  WA_keepQueryString = false
  WA_indexField = "RM_ID"
  WA_fieldNamesStr = "RM_BCODE|RM_DateTime|RM_PurchOrd|RM_Location|RM_Supplier|RM_Grade|RM_Thickness|RM_Quantity|RM_Status|RM_Product"
  WA_fieldValuesStr = "" & cStr(cStr(Request.Form("RM_BCODE"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_DateTime"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_PurchOrd"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Location"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Supplier"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Grade"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Thickness"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Quantity"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Status"))) & "" & "|" & "" & cStr(cStr(Request.Form("RM_Product"))) & ""
  WA_columnTypesStr = "',none,''|',none,NULL|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''"
  WA_comparisonStr = " LIKE | = | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE | LIKE "
  WA_fieldNames = Split(WA_fieldNamesStr,"|")
  WA_fieldValues = Split(WA_fieldValuesStr,"|")
  WA_columns = Split(WA_columnTypesStr,"|")
  WA_comparisions = Split(WA_comparisonStr, "|")
 
  WA_where_fieldValuesStr = "" & cStr(cStr(Request.Form("WADAUpdateRecordID"))) & ""
  WA_where_columnTypesStr = "none,none,NULL"
  WA_where_comparisonStr = "="
  WA_where_fieldNames = Split(WA_indexField,"|")
  WA_where_fieldValues = Split(WA_where_fieldValuesStr,"|")
  WA_where_columns = Split(WA_where_columnTypesStr,"|")
  WA_where_comparisions = Split(WA_where_comparisonStr, "|")
  
 
  updateParamsObj = WA_AB_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, -1)
  WhereObj = WA_AB_generateWhereClause(WA_where_fieldNames, WA_where_columns, WA_where_fieldValues, WA_where_comparisions)
  
  set MM_editCmd = Server.CreateObject("ADODB.Command")
  MM_editCmd.ActiveConnection = WA_connection
  MM_editCmd.CommandText = "UPDATE " & WA_table & " SET " & updateParamsObj(3) & " WHERE " & WhereObj & ""
  MM_editCmd.Execute()
  MM_editCmd.ActiveConnection.Close()
  if (WA_redirectURL <> "")  then
    if (WA_keepQueryString AND Request.QueryString <> "" AND Request.QueryString.Count > 0) then
      if (inStr(WA_redirectURL,"?") > 0)  then
	    WA_redirectURL = WA_redirectURL & "&"
      else
	    WA_redirectURL = WA_redirectURL & "?"
	  end if
      WA_redirectURL = WA_redirectURL & Request.QueryString
    end if
    Response.Redirect(WA_redirectURL)
  end if
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Update tbl_RM_Materials</title>
<link href="WA_DataAssist/styles/Modular_Poppy.css" rel="stylesheet" type="text/css" />
<link href="WA_DataAssist/styles/Arial.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background-color: #FFE8E8;
}
.style1 {color: #FF0000}
.style2 {font-size: 16}
.style11 {color: #FF0000; font-size: 16px; }
.style14 {font-size: 18px}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
 
<body onload="document.forms['WADAUpdateForm'].RM_Location.focus();">
<body>
 
<div id="Layer1" style="position:absolute; left:400px; top:200px; width:479px; height:56px; z-index:1"> 
  <p class="WADAHeaderText style14">To update the record choose new &quot;Location&quot; &amp; &quot;Status&quot;.</p>
  <p class="WADAHeaderText style2"><span class="style11"><span class="style14">To leave the record unchanged click &quot;Cancel&quot;</span>.</span> </p>
</div>
<div id="Layer2" style="position:absolute; left:308px; top:119px; width:171px; height:22px; z-index:2"><em><strong><span class="style1">RESET &quot;LOCATION!&quot;</span></strong></em></div>
<div id="Layer3" style="position:absolute; left:311px; top:288px; width:160px; height:25px; z-index:3" class="style1"><em><strong>RESET &quot;STATUS!&quot;</strong></em></div>
<div class="WADAUpdateContainer"> 
    <form action="tbl_RM_Materials_Update.asp" method="post" name="WADAUpdateForm" id="WADAUpdateForm">
      <div class="WADAHeader">Update Record: Select new location  and press update. </div>
      <table class="WADADataTable" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <th class="WADADataTableHeader"><div align="left">BCODE:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_BCODE" id="RM_BCODE" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_BCODE").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Date Time:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_DateTime" id="RM_DateTime" value="<%response.write( now())%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"></th>
          <td class="WADADataTableCell"><input type="Hidden" readonly name="RM_PurchOrd" id="RM_PurchOrd" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_PurchOrd").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Location:</div></th>
          <td class="WADADataTableCell">
            <select name="RM_Location">
              <%
While (NOT rs_Location.EOF)
%>
              <option value="<%=(rs_Location.Fields.Item("LocationNum").Value)%>"><%=(rs_Location.Fields.Item("LocationNum").Value)%></option>
              <%
  rs_Location.MoveNext()
Wend
If (rs_Location.CursorType > 0) Then
  rs_Location.MoveFirst
Else
  rs_Location.Requery
End If
%>
          </select></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Supplier:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Supplier" id="RM_Supplier" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Supplier").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Grade:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Grade" id="RM_Grade" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Grade").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Thickness:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Thickness" id="RM_Thickness" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Thickness").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Quantity:</div></th>
          <td class="WADADataTableCell"><input type="text" readonly name="RM_Quantity" id="RM_Quantity" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Quantity").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left">Status:</div></th>
          <td class="WADADataTableCell"><select name="RM_Status">
            <%
While (NOT rs_Status.EOF)
%>
            <option value="<%=(rs_Status.Fields.Item("status").Value)%>"><%=(rs_Status.Fields.Item("status").Value)%></option>
            <%
  rs_Status.MoveNext()
Wend
If (rs_Status.CursorType > 0) Then
  rs_Status.MoveFirst
Else
  rs_Status.Requery
End If
%>
          </select></td>
        </tr>
        <tr>
          <th class="WADADataTableHeader"><div align="left"></div></th>
          <td class="WADADataTableCell"><input type="Hidden" readonly name="RM_Product" id="RM_Product" value="<%=Replace((WADAdbotbl_RM_Materials.Fields.Item("RM_Product").Value)&"", """", "&quot;")%>" size="32" /></td>
        </tr>
      </table>
      <div class="WADAButtonRow">
        <table class="WADADataNavButtons" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td class="WADADataNavButtonCell" nowrap="nowrap"><input name="Update" type="image" id="Update" value="Update" src="WA_DataAssist/images/Poppy/Modular_update.gif" alt="Update" width="56" height="17" hspace="0" vspace="0" border="0"  /></td>
            <td class="WADADataNavButtonCell" nowrap="nowrap"><a href="tbl_RM_Materials_Results.asp"><img src="WA_DataAssist/images/Poppy/Modular_cancel.gif" alt="Cancel" name="Cancel" width="56" height="17" border="0" id="Cancel" /></a></td>
          </tr>
        </table>
        <input name="WADAUpdateRecordID" type="hidden" id="WADAUpdateRecordID" value="<%=Server.URLEncode((WADAdbotbl_RM_Materials.Fields.Item("RM_ID").Value))%>">
      </div>
       <% If WADAdbotbl_RM_Materials.EOF And WADAdbotbl_RM_Materials.BOF Then %>
      <div class="WADANoResults">
        <div class="WADANoResultsMessage">No record found.</div>
      </div>
      <% End If ' end WADAdbotbl_RM_Materials.EOF And WADAdbotbl_RM_Materials.BOF %>
    </form>
	  <p>  <table border="0">
    <tr>
      <td>  
	  	
  <form name="form2" method="post" action="http://localhost/tbl_RM_Materials_Results.asp">
    <input type="submit" name="Submit" value="Floor Inventory">
  </form>
  <form name="form3" method="post" action="http://localhost/tbl_RM_Materials_Insert_Scarf.asp">
    <input type="submit" name="Submit" value="Scarf Page">
  </form>
</td>
    </tr>
  </table>
&nbsp;</p>
 
</div>
</body>
</html>
<%
WADAdbotbl_RM_Materials.Close()
Set WADAdbotbl_RM_Materials = Nothing
%>
<%
rs_Location.Close()
Set rs_Location = Nothing
%>
<%
rs_Status.Close()
Set rs_Status = Nothing
%>
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:

Select allOpen in new window

 

by: SamuelClemmonsPosted on 2009-08-04 at 13:25:11ID: 25017786

What is happening now is that it does not seem to be passing the data in the fields of the results page to the fields of the update page.

The update page is looking at the table tbl_RM_Results

 

by: SamuelClemmonsPosted on 2009-08-04 at 16:41:46ID: 25019212

The view code I gave you was changed slightly per one of the error responses and suggestions. I have submitted the code as it was when it correctly related to the pages you now have.

SELECT     AllBarcodes.*, AllBarcodes.RM_BCODE AS Expr1
FROM         (SELECT     RM_BCODE, MAX(RM_Datetime) RM_Datetime
                       FROM          (SELECT     RM_BCODE, RM_Datetime
                                               FROM          PWC125.veneer.dbo.tbl_RM_Materials
                                               UNION ALL
                                               SELECT     BCODE AS RM_BCODE, RMDatetime
                                               FROM         PWC125.Veneer.dbo.RMaterial) A
                       GROUP BY RM_BCODE) LastDate INNER JOIN
                          (SELECT     RM_BCODE, RM_Datetime, RM_Location, RM_Supplier, RM_Product, RM_PurchOrd, RM_Grade, RM_Thickness, RM_Quantity, 
                                                   RM_Status
                            FROM          PWC125.veneer.dbo.tbl_RM_Materials
                            UNION ALL
                            SELECT     BCODE AS RM_BCODE, RMDatetime, RMLocation, RMSupplier, RMProduct, RMPo, RMGrade, RMThickness, RMQuantity, RMstatus
                            FROM         PWC125.Veneer.dbo.RMaterial) AllBarcodes ON AllBarcodes.RM_BCODE = LastDate.RM_BCODE AND 
                      AllBarcodes.RM_Datetime = LastDate.RM_Datetime

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:

Select allOpen in new window

 

by: DanielWilsonPosted on 2009-08-04 at 17:09:11ID: 25019353

I asked b/c what RCMB said about views not being updatable is not always correct.  But in the case of a complex view like this ... yes, it is correct.

There is a way around, using an Instead Of trigger.  Those do get complicated, however.  In all likelihood, you would do best to directly update the underlying table(s).

 

by: SamuelClemmonsPosted on 2009-08-05 at 10:11:35ID: 25025647

Thank you for your response. The problem is that this application is on a computer for a forklift operator to use in moving product around in the warehouse. I need the application to work so that it can be done as items are moved by the forklift operators.

What do you mean by "...directly update the underlying table(s)." Also I am not familar with an "Instead Of Trigger". How would that work? Can you give me an example.

I don't understand why the data in one page can't be passed to the other page in this application it seems like it should be simple.

Thanks again.

 

by: SamuelClemmonsPosted on 2009-08-07 at 10:25:46ID: 25045043

Thank you very much WhackAMod

 

by: DanielWilsonPosted on 2009-08-07 at 14:04:13ID: 25046941

here's an intro to Instead Of Triggers:
http://msdn.microsoft.com/en-us/library/aa224818(SQL.80).aspx

Basically, you put the trigger on a view and, instead of updating the view (which ti can't anyway) you do something else.  Your trigger interprets the instruction to update the view as updating the underlying table(s) -- getting back to what  rcmb said.

So ... you need to determine which data your users are permitted to change, and what that means to the underlying tables.

 

by: SamuelClemmonsPosted on 2009-08-07 at 16:14:30ID: 31613155

Thanks guys this helped. Along with some of the guys here we got it solved. Sorry this went on so long.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...