Results 1 to 3 of 3

Thread: Issues with Session Variables in Exporting to XLS

  1. #1
    Member
    Real Name
    Scott Carr
    Join Date
    Jul 2018
    Posts
    9

    Default Issues with Session Variables in Exporting to XLS

    Desperately trying to get someone else's code working on a new server for a charity. Here is the line of broken code:

    Code:
    if type = "xls" then
    			export_filename =  chr(92) + chr(92) + appShareName + chr(92) + word(session.session_folder,4,"\\") + chr(92) + session.SessionID + chr(92) + "CustomerGuardians.csv" 
    
    			ofile = chr(92) + chr(92) + appShareName + chr(92) + word(session.session_folder,4,"\\") + chr(92) + session.SessionID + chr(92) + "temp.csv"
    			columns = chr(92) + chr(92) + appShareName + chr(92) + word(session.session_folder,4,"\\") + chr(92) + session.SessionID + chr(92) + "columns.txt"
    			destination = export_filename
    
    			if a5_is_path_valid(chr(92) + chr(92) + appShareName + chr(92) + word(session.session_folder,4,"\\") + chr(92) + session.SessionID)
    
    				sql = "sp_rpt_Export_CustomerGuardians '" + ofile + "', '" + columns + "', '" + destination + "', '" + fltr + "', '" + session.database + "', '" + sort + "'"
    	
    				conn.open()
    				conn.execute(sql)
    				sleep(1)
    				if file.exists(destination) = .f. then
    					conn.execute(sql)
    				end if		
    				while file.exists(destination) = .f.
    			
    				end while
    	
    				conn.close()
    	
    	
    				response.redirect(session.session_url + "CustomerGuardians.csv?" +  time("hms3"))
    				end
    	
    			else
    				? "Path is not valid - cannot create file<br>"
    				
    				end 	
    			end if
    
    		end if
    The session.session_folder and session.sessionID variables still end up pointing to the old server. Any ideas on where to change this?

  2. #2
    "Certified" Alphaholic Tom Henkel's Avatar
    Real Name
    Tom Henkel
    Join Date
    May 2002
    Location
    New Jersey, USA
    Posts
    1,855

    Default Re: Issues with Session Variables in Exporting to XLS

    Scott,

    Where is the sessions pointer being DIMMED? If that is pointing to the old server, then it would be the issue.

    Tom

  3. #3
    Member
    Real Name
    Scott Carr
    Join Date
    Jul 2018
    Posts
    9

    Default Re: Issues with Session Variables in Exporting to XLS

    Quote Originally Posted by Tom Henkel View Post
    Scott,

    Where is the sessions pointer being DIMMED? If that is pointing to the old server, then it would be the issue.

    Tom
    Please excuse my ignorance, what is Dimmed?

Similar Threads

  1. State variables vs Session variables are they equivalent?
    By Clint2 in forum Mobile & Browser Applications
    Replies: 7
    Last Post: 02-16-2015, 12:55 PM
  2. Issues with session variables and dates.
    By lvasic in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 05-28-2013, 02:31 PM
  3. Caching and session variables when calling page with variables
    By nlights in forum Application Server Version 11 - Web/Browser Applications
    Replies: 11
    Last Post: 04-29-2013, 06:30 PM
  4. Session Variables as Date values in Array? Access Session Variable from Javascript ?
    By kimhere in forum Application Server Version 11 - Web/Browser Applications
    Replies: 3
    Last Post: 04-26-2013, 03:02 PM
  5. How to turn page variables into session variables in a grid
    By nlights in forum Application Server Version 11 - Web/Browser Applications
    Replies: 5
    Last Post: 02-25-2013, 12:47 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •