Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 9th, 2004, 02:50 PM
Registered User
 
Join Date: Aug 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default values not showing in production server.

Hello.
 I'm having a problem with a RecToTable results page. The code I have works on my PC perfectly fine, but when I copied the files to the Production servers, part of the values don't show up.

Code:
<!-- METADATA TYPE="typelib" 
              FILE="C:\Program Files\Common Files\System\ado\msado15.dll" -->



<%
  Response.Expires=0
  Dim objRS, strConnect, strCriteria, strSQL, blnExport
  Set objRS = Server.CreateObject("ADODB.Recordset")

 If Request("Clause") <> "" Then
   strSQL = "SELECT * FROM Snap_in WHERE Clause LIKE '" & Request("Clause") & "'"
 Else
   strSQL = "SELECT * FROM Snap_in"
 End If
    objRS.Open strSQL, strConnect
    If Request("Keyword") <> "" Then
     objRS.Filter = "Snap_in LIKE '*" & Request("Keyword") & "*'"
     End If
  ' now loop through the records
   Response.Write "<TABLE BORDER=1><TR ALIGN=CENTER><TD bgcolor=#ffc6a5>Needs Legal Approval</TD></TR></TABLE>"
If objRS.EOF Then
 Response.Redirect "Welcome.asp?Action=Retry"
 Else
   Response.Write RecToTableAll(objRS)   ' pass the recordset to the table function
   End If
  ' now close and clean up
  objRS.Close
  Set objRS = Nothing
%>



<SCRIPT language="JavaScript">
function Approval()
{
    alert("This snap-in clause is subject to prior review and approval for use by the applicable HP Attorney for the opportunity and BU.");
}  
</SCRIPT>
<%
    Dim strT                ' table html string
    Dim fldF                ' current field object
    Dim intFCount            ' counts number of fields
    Dim Link                ' indicates when to insert link


Function RecToTableAll(objRS)
strT = strT & "<H3>You must select the desired clause(s) and submit, before copying is allowed</H3>"
    strT = strT & "<form Action=Test.asp method=Post><TABLE BORDER=1><TR ALIGN=CENTER>"   ' build the table header
    For Each fldF In objRS.Fields            ' each field as a table column name
    Select Case (fldF.Name)
    Case "Approval", "Selected_Count"
    strT = strT & ""
    Case "Snap_in_ID"
    strT = strT & "<TD bgcolor=#cccccc><B>Select Clause</B></TD>"
    Case Else
    strT = strT & "<TD bgcolor=#cccccc><B>" & (Replace(fldF.Name,"_"," ")) & "</B></TD>"
    End Select
    Next
    strT = strT & "</TR>"
    While Not objRS.EOF                      ' now build the rows
      strT = strT & "<TR ALIGN=CENTER>"
      For Each fldF In objRS.Fields          ' loop through the fields
          Select Case (fldF.Name)
        Case "Snap_in_ID"
        strT = strT & "<TD><input type=checkbox name=selectclause value=" & objRS("Snap_in_ID") & "></TD>"
         Case "Clause"
         strT = strT & "<TD>" & objRS("Clause") & "</TD>"
        Case "Snap_in"
            If objRS("Approval").value = true Then
             strT = strT & "<TD bgcolor=#ffc6a5>" & Highlight_Text(objRS("Snap_in"))  & "</TD>"
            Else
            strT = strT & "<TD>" & Highlight_Text(objRS("Snap_in"))  & "</TD>"
            End If
         Case "Notes"
         strT = strT & "<TD>" & objRS("Notes") & "</TD>"
        Case"File"
              If fldF.Value <> "" Then
              strT = strT & "<TD><a href=" & objRS("File") & ">Related file</a></TD>"
              Else
              strT = strT & "<TD></TD>"
              End If
         End Select
    Next
        strT = strT & "</TR>"
      objRS.MoveNext
    Wend
    strT = strT & "<input type=submit value=submit><input type=hidden name=Keyword value=" & Request("Keyword") & "></form></TABLE>"
RecToTableAll = strT                ' and finally return the table
End Function

%>
for some reason, the checkbox and the cluase show up, no Snap_in, no Notes, no File link. the only file I could'nt copy over was the .mdf and .ldf files, which I'm not sure if they would make any difference or not. If the cluse shows up, why not the rest

Thanks for any advice :)

 
Old June 9th, 2004, 03:42 PM
Registered User
 
Join Date: Aug 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found the answer! I had to change the data type from text to varchar.:D






Similar Threads
Thread Thread Starter Forum Replies Last Post
Controls Work In Dev but not Production qdd ASP.NET 2.0 Basics 1 September 6th, 2007 12:45 PM
report is not showing values vinayak_chauhan BOOK: Professional Crystal Reports for VS.NET 1 May 30th, 2006 07:54 AM
~* Installing MSRS in Production Server *~ chakravarthy_vr Reporting Services 0 March 9th, 2006 09:31 PM
Resin Server showing error ghalebro Pro JSP 0 July 22nd, 2005 04:08 AM
Code showing current datet& time of server pareshk Wrox Book Feedback 1 June 6th, 2005 10:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.