Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 9th, 2004, 02:50 PM
Registered User
Join Date: Aug 2003
Location: Chico, CA, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default values not showing in production server.

 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.

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

  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") & "'"
   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"
   Response.Write RecToTableAll(objRS)   ' pass the recordset to the table function
   End If
  ' now close and clean up
  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.");
    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
    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>"
            strT = strT & "<TD>" & Highlight_Text(objRS("Snap_in"))  & "</TD>"
            End If
         Case "Notes"
         strT = strT & "<TD>" & objRS("Notes") & "</TD>"
              If fldF.Value <> "" Then
              strT = strT & "<TD><a href=" & objRS("File") & ">Related file</a></TD>"
              strT = strT & "<TD></TD>"
              End If
         End Select
        strT = strT & "</TR>"
    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 :)

Reply With Quote
  #2 (permalink)  
Old June 9th, 2004, 03:42 PM
Registered User
Join Date: Aug 2003
Location: Chico, CA, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

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

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 08:20 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.