Need help with dynamic variable syntax

Results 1 to 2 of 2

Thread: Need help with dynamic variable syntax

  1. #1
    Join Date
    Dec 1969

    Default Need help with dynamic variable syntax

    "Record_Id" is a hidden form field on the caller page.<BR>I want to append the value of "Record_Id" to a dynamic filename. <BR><BR>So, say Record_Id = 1234, I need the file path to read:<BR>D:path
    otif1234.txt. But the value of Record_Id is actually dynamically generated.<BR><BR><BR>Here&#039;s the code I have:<BR>Mail.AddAttachment "D:InetpubwwwrootwebsiteNZservicesmember
    otif"&Request.Form("Record_Id")&".txt" &#039;line 36<BR><BR>The error given is <BR>The system cannot find the file specified. <BR>/services/member/company_form_action_smime.asp, line 36 <BR><BR>But the file IS found in the following:<BR>Mail.AddAttachment "D:InetpubwwwrootwebsiteNZservicesmember
    otif1234.txt"<BR><BR>So, obviously there&#039;s something wrong with the syntax in the first instance.<BR><BR>Thanks in advance for any help

  2. #2
    Join Date
    Dec 1969

    Default Bill's mantra: DEBUG DEBUG DEBUG

    And what dynamic variable? You don&#039;t have any. But anyway...<BR><BR>&#060;%<BR>...<BR>FileName = "D:InetpubwwwrootwebsiteNZservicesmember
    otif"&Request.Form("Record_Id")&".txt" <BR><BR>Response.Write "DEBUG FILENAME: " & FileName & "&#060;P&#062;"<BR><BR>Mail.AddAttachment FileName<BR>...<BR>%&#062;<BR><BR>Look at what the debug shows you. Is it what you were expecting???<BR><BR><BR>

Posting Permissions

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