Results 1 to 2 of 2

Thread: Trying to read a PDF encoded into a database via aspdb

  1. #1
    Marc Alexander Ferrari Guest

    Trying to read a PDF encoded into a database via aspdb

    I am trying to get ASPDB enterprise to properly render a PDF encoded into a Sybase ver 12 database. The data type of the field that contains the blob is 201. When I run the code below instead of seeing my PDF document I see the word memo instead. The tech guys are saying that aspdb is expecting a data type of 205 not 201. If someone has some ideas I would be most appreciative.

    Let me know if you need any additional data from me.

    Thanks!


    Marc




    <!-- #INCLUDE FILE=&#34;cpsstuff.inc&#34; -->


    <%Response.Buffer=true%>
    <html>
    <body TEXT=&#34;Black&#34; LINK=&#34;BLUE&#34; ALINK=&#34;RED&#34; VLINK=&#34;BLUE&#34; Background=&#34;images/backreliefview.jpg&#34;>
    <font FACE=&#34;Arial,Helvetica&#34; Color=&#34;Black&#34; Size=&#34;2&#34;>

    <%

    Set MyDb = Server.CreateObject(&#34;ASP.db&#34 &#39;Create the ASP-db Object
    MyDb.dbUnit = 545 &#39;Make this a unique number for each page
    MyDb.dbDBType = &#34;SYBASE&#34; &#39;Use ACCESS, ORACLE, SQL, or SQL65
    MyDb.dbDSN = mydsn &#39; For SQL Server
    MyDb.dbSQL = &#34;Select permit_pdf from permit_doc&#34;

    MyDb.dbGridTableTag = &#34;border=1 cellspacing=2 cellpadding=2&#34; &#39;Turn on grid borders, etc.
    MyDb.dbFormTableTag = &#34;border=3 cellspacing=3 cellpadding=3&#34; &#39;Turn on different form borders, etc.
    MyDb.dbMode = &#34;grid&#34;

    MyDb.dbImageDir=&#34;images/&#34; &#39;Point to where the GIF navigation buttons are
    &#39;Choose which buttons to display
    MyDb.dbNavigationItem=&#34;top, bottom, next, prev, gridrow, color,filter, download&#34;
    MyDb.dbNavigationIcon=&#34;std&#34; &#39;Use the provided button filenames

    MyDb.DBColor = &#34;13&#34;
    MyDb.dbblob = &#34;permit_pdf,application/PDF,browser,0&#34;
    MyDb.ASPdb &#39;Display the data!
    %>

    &nbsp;&nbsp;&nbsp; <a href=&#34;../newmain.htm&#34; TARGET=&#34;main&#34;>Return to Main Menu</a><br>
    </body>
    </html>



  2. #2
    Frank Kwong Guest

    Trying to read a PDF encoded into a database via aspdb (reply)

    check you Sybase datatype. tell me what is ADO 201 (Long char) equivalent to in Sybase. But MEMO might have a chance to work too. YOu have to define the dbMemoTextSize=-1 to see the entire memo.

    FK


    ------------
    Marc Alexander Ferrari at 7/12/01 12:09:20 PM

    I am trying to get ASPDB enterprise to properly render a PDF encoded into a Sybase ver 12 database. The data type of the field that contains the blob is 201. When I run the code below instead of seeing my PDF document I see the word memo instead. The tech guys are saying that aspdb is expecting a data type of 205 not 201. If someone has some ideas I would be most appreciative.

    Let me know if you need any additional data from me.

    Thanks!


    Marc




    <!-- #INCLUDE FILE=&#34;cpsstuff.inc&#34; -->


    <%Response.Buffer=true%>
    <html>
    <body TEXT=&#34;Black&#34; LINK=&#34;BLUE&#34; ALINK=&#34;RED&#34; VLINK=&#34;BLUE&#34; Background=&#34;images/backreliefview.jpg&#34;>
    <font FACE=&#34;Arial,Helvetica&#34; Color=&#34;Black&#34; Size=&#34;2&#34;>

    <%

    Set MyDb = Server.CreateObject(&#34;ASP.db&#34 &#39;Create the ASP-db Object
    MyDb.dbUnit = 545 &#39;Make this a unique number for each page
    MyDb.dbDBType = &#34;SYBASE&#34; &#39;Use ACCESS, ORACLE, SQL, or SQL65
    MyDb.dbDSN = mydsn &#39; For SQL Server
    MyDb.dbSQL = &#34;Select permit_pdf from permit_doc&#34;

    MyDb.dbGridTableTag = &#34;border=1 cellspacing=2 cellpadding=2&#34; &#39;Turn on grid borders, etc.
    MyDb.dbFormTableTag = &#34;border=3 cellspacing=3 cellpadding=3&#34; &#39;Turn on different form borders, etc.
    MyDb.dbMode = &#34;grid&#34;

    MyDb.dbImageDir=&#34;images/&#34; &#39;Point to where the GIF navigation buttons are
    &#39;Choose which buttons to display
    MyDb.dbNavigationItem=&#34;top, bottom, next, prev, gridrow, color,filter, download&#34;
    MyDb.dbNavigationIcon=&#34;std&#34; &#39;Use the provided button filenames

    MyDb.DBColor = &#34;13&#34;
    MyDb.dbblob = &#34;permit_pdf,application/PDF,browser,0&#34;
    MyDb.ASPdb &#39;Display the data!
    %>

    <a href=&#34;../newmain.htm&#34; TARGET=&#34;main&#34;>Return to Main Menu</a><br>
    </body>
    </html>



Posting Permissions

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