Passing string to Software Artisans DLL

Results 1 to 2 of 2

Thread: Passing string to Software Artisans DLL

  1. #1
    Craig L Guest

    Default Passing string to Software Artisans DLL

    I am using the sample code from the article "Protecting Everything Part 2" on this site to display pdf files. Everything works fine when I hardcode the path to the file in the variable but when I populate the variable from the Request.Form method it doesn&#039;t work. And yes I have checked the variable being returned by Request.Form. a zillion times :)<BR><BR>This is making me crazy. Any help would be greatly appreciated.<BR><BR>Dim sPDFName<BR>Dim sPDFDate<BR>Dim sFileName<BR>Dim typeDate<BR><BR>sPDFDate = Request.Form("PDFDate")<BR>sPDFName = Request.Form("PDFName")<BR>Const sDirPath = "C:MyImages\"<BR><BR>sPDFDate = sPDFDate & "\"<BR>sPDFName = sPDFName & ".pdf"<BR><BR>&#039;sFileName = sDirPath & sPDFDate & sPDFName &#039;Doesn&#039;t work <BR>sFileName = "C:MyImages3-05-200110.pdf" &#039;WORKS <BR>&#039;----------sFileName contains the exact same path in both<BR>sFileName = CStr(sFileName)<BR>&#039;Response.Write sFileName &#039;test contents of sFileName<BR><BR>Response.ContentType = "application/pdf"<BR>Response.Buffer = False<BR>Response.Expires = 0<BR><BR>Dim oFM, oBS<BR>Set oFM = CreateObject("SoftArtisans.FileManager")<BR>Set oBS = oFM.OpenBinaryFile(sFileName)<BR><BR>Response.Bina ryWrite oBS.ReadAll<BR><BR>Set oBS = Nothing<BR>Set oFM = Nothing<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Passing string to Software Artisans DLL

    This looks good. Have you tried troubleshooting IIS? ;)

Posting Permissions

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