4 Replies Latest reply: Nov 16, 2012 2:15 AM by Billy~Verreynne RSS

    How to Write CLOB Data to Client PC

    user3029023
      Dear all,

      I need to write CLOB data to .txt file into Client PC?
      select clobvar from temp_clob;
      Any example fot it?


      Thanks
        • 1. Re: How to Write CLOB Data to Client PC
          sb92075
          user3029023 wrote:
          Dear all,

          I need to write CLOB data to .txt file into Client PC?
          select clobvar from temp_clob;
          Any example fot it?


          Thanks
          is application 3-tier

          DB Server knows nothing about Client PC.
          • 2. Re: How to Write CLOB Data to Client PC
            Billy~Verreynne
            user3029023 wrote:

            I need to write CLOB data to .txt file into Client PC?
            select clobvar from temp_clob;
            Any example fot it?
            Do you understand the basic concept of client-server?

            The client is responsible for communicating with the server. The client reads user input. The client sends user input to the server. The client receives server output. The client renders the server output for the client. Or saves the server output on the client.

            You cannot expect the server to write data (like a server CLOB) to a text file on the client. How is the server suppose to hack across the network, break open that client, and access that client's local drive to write data to it?

            So the answer to your question - the client needs to write the CLOB data it receives from the server, to a local text file.

            If you can explain the client, we can suggest how the server can deliver that CLOB to the client. E.g. is the client a fat client (Visual Basic for example), is the client a web browser, etc?
            • 3. Re: How to Write CLOB Data to Client PC
              user3029023
              I think i put the question wrong way... My point was how to write CLOB data in to a txt file as CLOB data in the table is more then 2gb . then is there a way to move that txt file to clients PC in PLSQL?
              • 4. Re: How to Write CLOB Data to Client PC
                Billy~Verreynne
                Does not change how client-server works.

                The client needs to read, from the database server, the 2GB LOB - and then the client needs to write that to a text file. PL/SQL does NOT write to a client file - or move server files to a client platform. This is NOT how client-server architecture works.

                If the client is a web browser, then it is as easy as executing from the browser a PL/SQL procedure, and this procedure streaming the LOB to the browser (using a specific Mime type). Upon which the browser will provide (assuming a proper Mime type is used) a file save as option for saving that server data stream to a local file.