Outputting PDF's from an ACCESS DB...

Results 1 to 3 of 3

Thread: Outputting PDF's from an ACCESS DB...

  1. #1
    Jermy Guest

    Default Outputting PDF's from an ACCESS DB...

    I am trying to control who has the ability to read certain PDF files. I do not have access to the server controls and cannot add any .dll&#039s to the server either. I was hoping I could embed the PDF&#039s into an ACCESS DB as an OLE Object and then have my ASP collect it and spawn Acrobat.<BR><BR>I have succeeded in embedding the PDF&#039s (no-brainer) and have a script that outputs all of the data from the cell (including ACCESS&#039s control characters) and dumps it into a web page.<BR><BR>I was hoping someone could help me refine my script to get rid of ACCESS&#039s control characters and to get Acrobat to actually open.<BR><BR>TIA,<BR><BR>Jeremy<BR><BR>&#060;%<BR> dim QStr<BR>QStr = REQUEST.SERVERVARIABLES("QUERY_STRING")<BR>QStr = replace(QStr, "ID=", "")<BR><BR>set Conn=server.createobject("ADODB.Connection")<BR> Conn.open "database"<BR>set RS = Server.CreateObject("ADODB.Recordset")<BR>sqlStrin g="SELECT * From docs where ID =" & QStr<BR>RS.Open sqlString, Conn, 2, 3<BR><BR>sFileName = rs("Loc")<BR><BR>response.Expires = 0<BR>response.Buffer = True<BR>response.Clear<BR>Response.ContentType = "application/pdf"<BR>response.binarywrite RS("Loc")<BR><BR>set QStr = nothing<BR>Conn.close<BR>%&#062;<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Can you tell me how you got ASP to insert the PDF

    Can you please tell me how you got ASP to insert the PDF into the OLE Object feild in Access.<BR><BR>Cheers!<BR><BR>Mike

  3. #3
    Jermy Guest

    Default RE: Can you tell me how you got ASP to insert the

    I went into ACCESS, in design view told it to make that field an OLE Object, and then went to the field did a right click and inserted an object. I made sure to use a link rather than embedding the object (to keep the DB from getting too large and when I embed the object the ASP doesn&#039t seem to recognize it).<BR><BR>Thanks,<BR>Jeremy

Posting Permissions

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