Carregando arquivo no campo BLOB

Ola galera!!..
Estou fazendo uma software que carrega um arquivo no campo do tipo Blob, fiz isso no mysql e deu certo, pois tem uma função no mysql chamada LOAD_FILE() que carrega o endereço do arquivo para o banco.
Essa função tem no ORACLE? ou algo similar que carregue o endereço do arquivo.
Obrigado e que Deus abençõe a todos vocês

Which function use to load the address of where this the archive to be recorded in a field BLOB.
Mysql example: INSERT INTO Table (photo) VALUES (LOAD_FILE (?));
“LOAD_FILE ()” is used in the bank mysql. Which to use in oracle?

Similar Messages

  • Tem  como usar um arquivo em pdf como modelo, e editar os campos no formscentral?Tem  como usar um arquivo em pdf como modelo, e editar os campos no formscentral?

    Tem  como usar um arquivo em pdf como modelo, e editar os campos no formscentral?

    Bom dia otaconlink. Tudo bem?
    Aquisição de dados:
    Gostaria de saber o que você gostaria de modificar no programa, são os dados de vibração?
    Tratamentos de dados:
     O seguinte link indica alguns exemplos aplicáveis ao seu programa:
    http://venus.ni.com/nisearch/app/main/p/bot/no/sn/catnav%3Aexample/ses/false/ap/global/q/fourier/lan...
    Comparação de dados:
    Você pode utilizar a estrutura de caso.
    Alguns exemplos de comparação de dados:
    http://zone.ni.com/devzone/cda/epd/p/id/4719
    http://zone.ni.com/devzone/cda/epd/p/id/5219
    https://decibel.ni.com/content/docs/DOC-12441
    http://zone.ni.com/devzone/cda/epd/p/id/5785
    Atenciosamente.
    Erick Yamamoto
    Application Engineer
    National Instruments Brazil
    Visite a nossa comunidade em PORTUGUÊS!!!

  • Dúvida no Preenchimento dos campos PREFNO / CHECOD em NFS-e de SP

    Olá Pessoal,
    Estou a procura de informações sobre a solução para nota fiscal eletronica de serviços da prefeitura de São Paulo, pesquisando no forum pouco encontrei sobre a nota 981687 - NFe: For Services in Muncipio Sao Paulo.
    A SAP disponibilizou os dois campos PREFNO / CHECOD para o numero da nota fiscal e código de verificação gerados pela prefeitura (uma vez que o SAP deve gerar o número da RPS), além de um report para geração do arquivo TXT e envio manual.
    Minha dúvida é a seguinte:
    1) Após enviar o arquivo para a prefeitura, são convertias as RPS em Notas Fiscais Eletronicas. Como armazenar as informações nos campos standards mencionados ? Existe um outro report que le o arquivo de retorno da prefeitura ?
    Outra dúvida está na procura de uma sugestão, onde o RPS pode ter até 12 posições e o NFNUM do SAP apenas 6. Vcs estão utilizando outro campo Z para compor o numero maior ? Ou como esta fazendo quando o RPS atingir 999.999 ? Pensei en usar o NFENUM, mas teria o mesmo problema quando atingir o limite de 9 posições (999.999.999).
    Muito obrigado pela atenção e ajuda.

    A_cristovao ,
    Vamos ver se posso lhe ajudar em algo:
    1) Após enviar o arquivo para a prefeitura, são convertias as RPS em Notas Fiscais Eletronicas. Como armazenar as informações nos campos standards mencionados ? Existe um outro report que le o arquivo de retorno da prefeitura ?
    Resposta: Em alguns projetos que passei, consultei os abaps e sempre foi desenvolvido um programa Z para ler este arquivo e fazer um BDC na J1B2N, porem sua categoria de nota não dever ser eletrônica, aqueles dois campos flag no cabeçalho NF eletronica e NF servico, apenas o último(serviço) marcado para o BDC entrar e conseguir mapear o campo com o NFSe e cod verificador.
    2) Outra dúvida está na procura de uma sugestão, onde o RPS pode ter até 12 posições e o NFNUM do SAP apenas 6. Vcs estão utilizando outro campo Z para compor o numero maior ? Ou como esta fazendo quando o RPS atingir 999.999 ? Pensei en usar o NFENUM, mas teria o mesmo problema quando atingir o limite de 9 posições (999.999.999).
    Resposta: Esse estamos usando o NFNUM mesmo, não chegamos a nos preocupar com isso devido ser um volume baixo de NFS, talvez um chamado no componente XX-CSC-BR-NFE lhe ajude. 
    Abraço,
    Bruno Lima

  • NF-e e-mail para envio do arquivo XML para clientes

    Olá pessoal,
    Gostaria de saber se existe algum campo no cadastro do Cliente / Fornecedor para cadastrar o e-mail para o envio do arquivo XML da NF-e.
    Obrigado,
    Jean

    Na sessão "Communication", no botão do lado do campo email, vc pode definir mais de um email praquele cliente.
    Vc pode ter o email padrão de comunicação comercial (com o flag de standard) e outro email para NFE.
    Vc pode inclusive definir uma string "padrão" pra usar no campo "Notes" pros emails de NFE em seu cadastro.
    Daí o programa Z de leitura dos emails do cadastro pode sempre buscar pelo email com o campo Notes igual a essa string.
    Vide figura anexa.
    Abs,
    Henrique.

  • SPED Fiscal - Imposto de Importação (registro C190, campo VL_OPR)

    Colegas,
    A pouco tempo implementamos as notas para atendimento à NT 2011.004 da SEFAZ e dentre as modificações que ela implementa, como vocês devem saber, ela cria uma nova categoria de imposto para o Imposto de Importação (II01).
    Com esta nova categoria de imposto as notas fiscais de importação passaram a ser digitadas com o destaque deste imposto diretamente na aba de Impostos, assim como acontece com o IPI.
    O problema é que quando esta nota é listada no arquivo do SPED FIscal, o valor do campo VL_OPR(Valor da operação) do registro C190, não fecha com o valor do campo VL_DOC do registro C100 (Valor Total da nota fiscal),considerando apenas um item, para ficar mais fácil o entendimento, isto porque o II deixou de ser considerado no campo "Expenses/Despesas" do item na nota. Isto teve de ser feito por conta da nova categoria de imposto, se mantivermos a digitação do valor neste campo a nota "duplica" o valor do II (esta situação é idêntica para o IPI).
    Analisando o programa standard do SPED Fiscal, no include J_1BEFD_BLOCK_C_AUX2, perform PROCESS_REG_C190, existe um tratamento especfício para o IPI, onde é realizada uma pesquisa pelos impostos do item e existindo o IPI, o seu valor é adicionado ao campo VL_OPR.
    Para o II não existe nenhum tratamento o que está gerando um Aviso no PVA do SPED Fiscal, já que os valores de totais de Item e Nota não fecham.
    Alguém já se deparou com o mesmo problema?
    Alguém sabe se a SAP providenciou ou está providenciando este ajuste (procurei por notas e não localizei nada a respeito).
    Grato pela ajuda.
    Rodrigo

    Encontrei a nota que resolve o problema.
    Note 1670878 - SPED-EFD: C190-VL_OPR does not sum value of import tax.
    Abraços.

  • Migrating a table with BLOB field from SQL-Server to Oracle.

    Hi All,
    I'm trying to create a Class to migrate data from SQL-Server to Oracle, this table has a BLOB field.
    The Code:
    package br.com.infox;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.Statement;
    public class Migrador {
         public static void main(String[] args){
              try {
                   // Conex�o com o SQL Server
                   Class.forName("net.sourceforge.jtds.jdbc.Driver");
                   Connection conSQL = DriverManager.getConnection ("jdbc:jtds:sqlserver://10.10.2.9/protocolo","prot","suinf2002");
                   // Conex�o com o Oracle
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   Connection conORA = DriverManager.getConnection ("jdbc:oracle:thin:@10.10.2.2:1521:des","protocolo","protocolo");
                   Statement stSQL = conSQL.createStatement();
                   String querySQL = "SELECT * FROM DOC_INCORPORADO";
                   ResultSet rsSQL = stSQL.executeQuery(querySQL);
                   String queryORA = "INSERT INTO PROT_VITALICIAMENTO (NU_PROCESSO, ANO_PROCESSO, CD_USUARIO, DT_ENVIO," +
                             "DE_COMPLEMENTO, NM_ARQUIVO, ARQUIVO, NU_SEQ, CD_TIPO_ARQUIVO, MES, ANO) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
                   PreparedStatement psORA = conORA.prepareStatement(queryORA);
                   while (rsSQL.next()){
                        System.out.println("Linha: " + rsSQL.getRow());
                        psORA.setInt(1, rsSQL.getInt("nu_processo"));
                        psORA.setInt(2, rsSQL.getInt("ano_processo"));
                        psORA.setInt(3, rsSQL.getInt("cd_usuario"));
                        psORA.setDate(4, rsSQL.getDate("dt_incorporacao"));
                        psORA.setString(5, rsSQL.getString("complemento"));
                        psORA.setString(6, rsSQL.getString("nm_arquivo"));
                        psORA.setBinaryStream(7, rsSQL.getBinaryStream("arquivo"), (int)rsSQL.getBlob("arquivo").length());
                        psORA.setInt(8, rsSQL.getInt("num_seq"));
                        psORA.setInt(9, rsSQL.getInt("cd_tipo_arquivo"));
                        psORA.setInt(10, rsSQL.getInt("mes"));
                        psORA.setInt(11, rsSQL.getInt("ano"));
                        psORA.executeUpdate();
                   stSQL.close();
                   psORA.close();
                   conORA.close();
                   conSQL.close();
              } catch (Exception e){
                   e.printStackTrace();
    The ERROR:
    java.sql.SQLException: Exce��o de E/S: Connection reset
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
         at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3668)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1119)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2191)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2064)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2989)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:658)
         at br.com.infox.Migrador.main(Migrador.java:41)
    What's the problem of these Class?
    Thank's.

    Depending on the version of the database you have, you could use transportable tablespaces.
    http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96524/c04space.htm#9370

  • Writing BLOB column from Cobol

    Hi,
    I´m using the Pro*Cobol pre-compile to execute SQL statements into programs Cobol Net Express.
    I need two helps.
    1 - How can do to the Pro*Cobol cut the blanks on the right into PIC X Varying hosts variables ?
    For example :
    ..... LastName VARCHAR(20)
    ..... 05 LASTNAME PIC X(20) VARYING.
    The Pro*Cobol documentation say that precompile transform the elementary item LASTNAME to the group item bellow :
    05 LASTNAME.
    10 LASTNAME-LEN PIC S9(04) COMP.
    10 LASTNAME-ARR PIC X(20).
    When a string less than 20 is moved to LASTNAME-ARR, the exact string lenght is moved to the LASTNAME-LEN and the string is writen
    into DB without blanks on right.
    When a string is red from DB, the precompile write into LASTNAME-LEN the exact string lenght and the LASTNAME-ARR receive the
    string value without blanks on write.
    Occurs that when I compile the program the Pro*Cobol/Micro Focus don´t recognize LASTNAME-LEN and LASTNAME-ARR.
    Am I correct ? May I use any directive that resolve that ?
    2 - I need to check these step-by-step to write a text file generated from cobol into a BLOB column.
    The LOAD FROM FILE statement receive SQLCODE -22275 : Invalid LOB locator specified.
    Assumptions :
    MAG-RELAT-BFILE SQL-BFILE.
    MAG-RELAT-BLOB SQL-BLOB.
    The fiel R1401 exists in D:\Petros\NE\
    Source Code :
    MOVE 'D:\Petros\NE\' TO ALIAS
    MOVE 13 TO ALIAS-L
    MOVE 5 TO FILENAME-L
    MOVE 'R1401' TO FILENAME
    EXEC SQL
    ALLOCATE :IMAG-RELAT-BFILE
    END-EXEC.
    IF SQLCODE NOT EQUAL +0
    MOVE 'ERRO COMANDO ALLOCATE' TO WW-CA-MENSAGEM
    MOVE 'IMAG-RELAT-BFILE' TO WW-CA-ARQUIVO
    MOVE SQLCODE TO WW-ST-ARQUIVO
    MOVE 08 TO RETURNO-CODE
    PERFORM 999-TRATA-ERRO THRU 999-FIM
    END-IF.
    EXEC SQL
    LOB FILE SET :IMAG-RELAT-BFILE
    DIRECTORY = :ALIAS,
    FILENAME = :FILENAME
    END-EXEC.
    IF SQLCODE NOT EQUAL +0
    MOVE 'ERRO COMANDO LOB FILE SET' TO WW-CA-MENSAGEM
    MOVE 'IMAG-RELAT-BFILE' TO WW-CA-ARQUIVO
    MOVE SQLCODE TO WW-ST-ARQUIVO
    MOVE 08 TO RETURNO-CODE
    PERFORM 999-TRATA-ERRO THRU 999-FIM
    END-IF.
    EXEC SQL
    ALLOCATE :IMAG-RELAT-BLOB
    END-EXEC
    IF SQLCODE NOT EQUAL +0
    MOVE 'ERRO COMANDO ALLOCATE' TO WW-CA-MENSAGEM
    MOVE 'IMAG-RELAT-BLOB' TO WW-CA-ARQUIVO
    MOVE SQLCODE TO WW-ST-ARQUIVO
    MOVE 08 TO RETURNO-CODE
    PERFORM 999-TRATA-ERRO THRU 999-FIM
    END-IF.
    EXEC SQL
    LOB LOAD :TOTAL-BYTES
    FROM FILE :IMAG-RELAT-BFILE
    INTO :IMAG-RELAT-BLOB
    END-EXEC.
    IF SQLCODE NOT EQUAL +0
    MOVE 'ERRO COMANDO LOAD FFOM FILE' TO WW-CA-MENSAGEM
    MOVE 'IMAG-RELAT-BFILE, IMAG-RELAT-BLOB' TO WW-CA-ARQUIVO
    MOVE SQLCODE TO WW-ST-ARQUIVO
    MOVE 08 TO RETURNO-CODE
    PERFORM 999-TRATA-ERRO THRU 999-FIM
    END-IF.
    Thanks,

    907466 wrote:
    Hi,
    I´m using the Pro*Cobol pre-compile to execute SQL statements into programs Cobol Net Express.
    I started my career as a cobol programmer in 1981, and the last project I worked on before transitioning to DBA was implementing MF Cobol. It's been a number of years but ...
    I need two helps.
    1 - How can do to the Pro*Cobol cut the blanks on the right into PIC X Varying hosts variables ?
    For example :
    ..... LastName VARCHAR(20)
    ..... 05 LASTNAME PIC X(20) VARYING.
    The Pro*Cobol documentation say that precompile transform the elementary item LASTNAME to the group item bellow :
    05 LASTNAME.
    10 LASTNAME-LEN PIC S9(04) COMP.
    10 LASTNAME-ARR PIC X(20).
    When a string less than 20 is moved to LASTNAME-ARR, the exact string lenght is moved to the LASTNAME-LEN and the string is writen
    into DB without blanks on right.
    When a string is red from DB, the precompile write into LASTNAME-LEN the exact string lenght and the LASTNAME-ARR receive the
    string value without blanks on write.
    Occurs that when I compile the program the Pro*Cobol/Micro Focus don´t recognize LASTNAME-LEN and LASTNAME-ARR.
    Am I correct ? May I use any directive that resolve that ?
    I don't know if you are correct or not. Is the pre-compiler or compiler step throwing an error message? If you are correct, there should be an error message that you should share with us.
    2 - I need to check these step-by-step to write a text file generated from cobol into a BLOB column.
    The LOAD FROM FILE statement receive SQLCODE -22275 : Invalid LOB locator specified.
    Assumptions :
    MAG-RELAT-BFILE SQL-BFILE.
    MAG-RELAT-BLOB SQL-BLOB.
    The fiel R1401 exists in D:\Petros\NE\
    Source Code :
    MOVE 'D:\Petros\NE\' TO ALIAS
    MOVE 13 TO ALIAS-L
    MOVE 5 TO FILENAME-L
    MOVE 'R1401' TO FILENAME
    EXEC SQL
    ALLOCATE :IMAG-RELAT-BFILE
    END-EXEC.
    IF SQLCODE NOT EQUAL +0
    MOVE 'ERRO COMANDO ALLOCATE' TO WW-CA-MENSAGEM
    MOVE 'IMAG-RELAT-BFILE' TO WW-CA-ARQUIVO
    MOVE SQLCODE TO WW-ST-ARQUIVO
    MOVE 08 TO RETURNO-CODE
    PERFORM 999-TRATA-ERRO THRU 999-FIM
    END-IF.
    EXEC SQL
    LOB FILE SET :IMAG-RELAT-BFILE
    DIRECTORY = :ALIAS,
    FILENAME = :FILENAME
    END-EXEC.
    IF SQLCODE NOT EQUAL +0
    MOVE 'ERRO COMANDO LOB FILE SET' TO WW-CA-MENSAGEM
    MOVE 'IMAG-RELAT-BFILE' TO WW-CA-ARQUIVO
    MOVE SQLCODE TO WW-ST-ARQUIVO
    MOVE 08 TO RETURNO-CODE
    PERFORM 999-TRATA-ERRO THRU 999-FIM
    END-IF.
    EXEC SQL
    ALLOCATE :IMAG-RELAT-BLOB
    END-EXEC
    IF SQLCODE NOT EQUAL +0
    MOVE 'ERRO COMANDO ALLOCATE' TO WW-CA-MENSAGEM
    MOVE 'IMAG-RELAT-BLOB' TO WW-CA-ARQUIVO
    MOVE SQLCODE TO WW-ST-ARQUIVO
    MOVE 08 TO RETURNO-CODE
    PERFORM 999-TRATA-ERRO THRU 999-FIM
    END-IF.
    EXEC SQL
    LOB LOAD :TOTAL-BYTES
    FROM FILE :IMAG-RELAT-BFILE
    INTO :IMAG-RELAT-BLOB
    END-EXEC.
    IF SQLCODE NOT EQUAL +0
    MOVE 'ERRO COMANDO LOAD FFOM FILE' TO WW-CA-MENSAGEM
    MOVE 'IMAG-RELAT-BFILE, IMAG-RELAT-BLOB' TO WW-CA-ARQUIVO
    MOVE SQLCODE TO WW-ST-ARQUIVO
    MOVE 08 TO RETURNO-CODE
    PERFORM 999-TRATA-ERRO THRU 999-FIM
    END-IF.
    Thanks,So far you haven't shown us any symptoms, errors, etc. Just a description of what you are doing and a statement that you assume it won't work. Your executable code has a lot of reference to host variables that we can only assume a spelled correctly to match to variables you've declared in your data division. Are you going straight from submitting precompile to run-time, or are you using the very excellent interactive source-level debugger that is a prime feature of MF Cobol?

  • Erro de versao/Leiaute do arquivo Sped EFD no validador 2.0.24

    Prezados,
    Fizemos o download da versao mais nova do validador (2.0.24) e apos isso o arquivo do SPED EFD nao é validado mais, informando erro na versao/leiaute do arquivo.
    Existe alguma nota? Devemos usar o validador antigo ou talvez acertar a versao do arquivo na mao?
    Obrigado
    Rodrigo

    Oi Luciano,
       Em primeiro lugar obrigado pela resposta... Respondendo suas perguntas:
                  Para qual período esta gerando o arquivo?   Janeiro 2012
                  E qual a versão esta no campo COD_VER do registro 0000? 2.. mas tentei com 1 ou 9 e tambem nao aceita.
                  Qual a versão do Validador?   Versao 2.2.5
       Outra coisa... eh muito provavel que a empresa venha a utilizar o special ledger para gerar os saldos das contas(porque a variante de periodo contabil foi configurada para 5,4,4 .. ou seja. semanal, e o mes de fevereiro, por exemplo, so fecha no dia 04/02).
       Saberia dizer se o programa esta preparado para obter os dados do special ledger?
    Abraço
    Luiz Carlos Schaefer

  • Campo de usuário em tabela de usuário não respeita o tamanho definido

    Criei uma tabela de usuário e dentro dela criei 10 campos alfanuméricos com tamanho de 10 posições. Ao executar a procedure SP_HELP no SQL Server para verificar o tamanho dos campos na estrutura da tabela verifiquei que o tamanho foi definido como -1, ou seja, o tamanho do campo não foi corretamente informado pelo B1 na criação da tabela e o SQL Server 2005 acabou por assumir como padrão o tamanho máximo de 4096 bytes.
    Se olharmos apenas para a definição da tabela e dos campos no B1 os valores são apresentados corretamente, mas não correspondem aos valores definidos nos metadados do banco. Isso é extremamente problemático pois derruba violentamente a performance das consultas nas tabelas de usuário.
    Existe algum workaround que a gente pode utilizar para resolver este problema?
    Testamos a criação de tabelas e campos de usuários na versão 2005B, rodando no SQL Server 2005 com as PLs 40, 41 e 42 e nessas três configurações o problema ocorreu sempre da mesma forma, como descrito acima.
    Sei que podemos forçar a correção da estrutura de dados das tabelas na mão, pelo comando ALTER TABLE do SQL Server, mas isso será apontado pelo Early Watch? Corremos o risco de perder a garantia do produto?
    Qualquer informação que ajudar a solucionar este problema será muito bem aceita.
    []'s
    Edited by: Rui Pereira on Nov 7, 2008 9:27 AM

    Oi Vitor,
    O problema ainda não foi resolvido. Abrimos um chamado na SAP pois entendemos que este comportamento do SBO não é o correto uma vez que ao definir campos alfanuméricos com o maior tamanho possível, as estruturas (metadados) acabam ficando gigantes e isso joga a performance dos add-ons e consultas formatadas pra baixo.
    Você pode reproduzir o problema criando UDFs em tabelas standard ou em UDTs pelo próprio B1. Não precisa criar os campos pelo SDK para que o problema ocorra não. Basta definir o campo do tipo Alfanumérico que, ao executar a SP_HELP no SQL Server você verá a estrutura do seu campo mais ou menos assim:
    CAMPO NVARCHAR(-1)
    Na documentação do SQL Server é explicado que o -1 representa a capacidade máxima de armazenamento do campo.
    Este problema só acontece no SQL Server 2005. No SQL Server 2000 o B1 se comporta bem.
    Edited by: Gabriel Izar on Oct 8, 2008 3:31 PM

  • Need help to open a blob from a report into another tab or browser window.

    Hello everyone.
    I'm looking for a bit of guidance on something I'm trying to do in Apex.
    I have a report that contains a blob. Users can click on the link to open it in same browser. I also know how to make it download if they click the link. But what I really want to do is to click the link and open the blob in another tab or browser window.
    Thank you in advance for your help.
    Dw
    I should have noted I'm using version 3.2
    Edited by: DW Brown on Feb 22, 2012 3:13 PM

    DW Brown wrote:
    It becomes a link from the column format section..
    DOWNLOAD:<tablename>:<column>:ID::MIMETYPE:FILENAME:LAST_UPDATE_DATE::inline:Click Here
    So far I haven't found a way to use something link "target=_blank"One way would be to use a Dynamic Action to apply the <tt>target="_blank"</tt> attribute to each link, or convert them to use APEX pop-ups or a jQuery lightbox like fancyBox.
    Create an example on apex.oracle.com if you need more assistance.

  • Help, how to open and display blobs from tables

    Dear all,
    I am trying to store ms-word files on a table using a blob column.
    Does anyone how to open the files and display them from a form using 9iAS?
    Thank you.
    Carlos.

    And there may be, but you won't likely find that here. Do some time searching Google and maybe you'll find code that someone was nice enough to make freely available, although I wouldn't count on it. Were i a programmer and took the time to read those docs and write the code, I'd want to be paid for my time. But there are a lot of programmers who swear by freeware! You may get lucky.

  • How to retrieve all the data from a BLOB using view-generated accessor

    I am using JDeveveloper 10g v. 10.1.3 and am storing an image in a database as a blob object and need to retrieve all of the data to get the entire image and store it in an ImageIcon. The code I have works partially in that it retrieves the correct data, but only gets a piece of it, leaving me with a partial image.
    AppModuleImpl am;
    ImageVwViewImpl vo;
    am = (AppModuleImpl)panelBinding.getDataControl().getDataProvider();
    vo = (ImageVwViewImpl)am.findViewObject("ImageVwView");
    ImageVwViewRowImpl ivo = (ImageVwViewRowImpl)vo.getCurrentRow();
    ImageIcon icon = new ImageIcon(ivo.getImage().getBytes(1, (int)ivo.getImage().getBufferSize()));
    jULabel1.setIcon(icon);I either need to know how to use a stream to get the data out (from BlobDomain method getBinaryStream()), or how to get the other chunks of data separately.
    edit: I know the problem is that getBufferSize() returns an int which is too small to hold all the data, but need to know what to use instead. Thanks!

    This is the code I'm using now. Same problem :(
    AppModuleImpl am;
            ImageVwViewImpl vo;
            am = (AppModuleImpl)panelBinding.getDataControl().getDataProvider();
            vo = (ImageVwViewImpl)am.findViewObject("ImageVwView");
            ImageVwViewRowImpl ivo = (ImageVwViewRowImpl)vo.getCurrentRow();  
            ImageIcon icon = new ImageIcon(ivo.getImage().toByteArray());
            jULabel1.setIcon(icon);

  • Error while importing a table with BLOB column

    Hi,
    I am having a table with BLOB column. When I export such a table it gets exported correctly, but when I import the same in different schema having different tablespace it throws error
    IMP-00017: following statement failed with ORACLE error 959:
    "CREATE TABLE "CMM_PARTY_DOC" ("PDOC_DOC_ID" VARCHAR2(10), "PDOC_PTY_ID" VAR"
    "CHAR2(10), "PDOC_DOCDTL_ID" VARCHAR2(10), "PDOC_DOC_DESC" VARCHAR2(100), "P"
    "DOC_DOC_DTL_DESC" VARCHAR2(100), "PDOC_RCVD_YN" VARCHAR2(1), "PDOC_UPLOAD_D"
    "ATA" BLOB, "PDOC_UPD_USER" VARCHAR2(10), "PDOC_UPD_DATE" DATE, "PDOC_CRE_US"
    "ER" VARCHAR2(10) NOT NULL ENABLE, "PDOC_CRE_DATE" DATE NOT NULL ENABLE) PC"
    "TFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS"
    " 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "TS_AGIMSAPPOLOLIVE030"
    "4" LOGGING NOCOMPRESS LOB ("PDOC_UPLOAD_DATA") STORE AS (TABLESPACE "TS_AG"
    "IMSAPPOLOLIVE0304" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 NOCACHE L"
    "OGGING STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEF"
    "AULT))"
    IMP-00003: ORACLE error 959 encountered
    ORA-00959: tablespace 'TS_AGIMSAPPOLOLIVE0304' does not exist
    I used the import command as follows :
    imp <user/pwd@conn> file=<dmpfile.dmp> fromuser=<fromuser> touser=<touser> log=<logfile.log>
    What can I do so that this table gets imported correctly?
    Also tell me "whether the BLOB is stored in different tablespace than the default tablespace of the user?"
    Thanks in advance.

    Hello,
    U can either
    1) create a tablespace with the same name in destination where you are trying to import.
    2) get the ddl of the table, modify the tablespace name to reflect the existing tablespace name in destination and run the ddl in the destination database, and run your import command with option ignore=y--> which will ignore all the create errors.
    Regards,
    Vinay

  • Error while trying to store PDF in Oracle's BLOB field

    Hi folks!
    I'm having problems while trying to store PDF file in a BLOB field of an Oracle table
    This is the message code:
    Exception in thread "main" java.sql.SQLException: Data size bigger than max size for this type: 169894
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at oracle.jdbc.ttc7.TTCItem.setArrayData(TTCItem.java:95)
    at oracle.jdbc.dbaccess.DBDataSetImpl.setBytesBindItem(DBDataSetImpl.java:2414)
    at oracle.jdbc.driver.OraclePreparedStatement.setItem(OraclePreparedStatement.java:1134)
    at oracle.jdbc.driver.OraclePreparedStatement.setBytes(OraclePreparedStatement.java:2170)
    at vgoactualizacion.Main.main(Main.java:84)     
    This is the piece of code i'm using:
    Assuming conn = conection to Oracle 10g Database ( it's working )
    String miProcedimientoAlmacenado = "{ call package_name.update_client(?,?, ?) }";
    CallableStatement miComando = conn.prepareCall(miProcedimientoAlmacenado);
    miComando.setString(1,miClienteID ); //first parameter : IN
                   //second parameter : IN
    File miPDF = new File(pathPDF + "//" + miClienteID + ".pdf");
    byte[] bodyIn = readFully(miPDF); //readFully procedure is shown below
    miComando.setBytes(2, bodyIn); //THIS IS THE LINE WHERE THE ERROR IS PRODUCED
              //3rd parameter: OUT
    miComando.registerOutParameter(3, java.sql.Types.VARCHAR);
    miComando.execute();
    private static byte[] readFully(File miPDF) throws FileNotFoundException, IOException {
    FileInputStream fis = new FileInputStream(miPDF);
    byte[] tmp = new byte[1024];
    byte[] data = null;
    int sz, len = 0;
    while ((sz = fis.read(tmp)) != -1) {
    if (data == null) {
    len = sz;
    data = tmp;
    } else {
    byte[] narr;
    int nlen;
    nlen = len + sz;
    narr = new byte[nlen];
    System.arraycopy(data, 0, narr, 0, len);
    System.arraycopy(tmp, 0, narr, len, sz);
    data = narr;
    len = nlen;
    if (len != data.length) {
    byte[] narr = new byte[len];
    System.arraycopy(data, 0, narr, 0, len);
    data = narr;
    return data;
    }//fin readFully
    This approach indicates that the PDF file is converted into an array of bytes, then is stored as binary in the BLOB field.
    Thanx in advance, and looking forward for your comments.

    You will probably need to use the setBinaryStream() method instead of setBytes().

  • Oracle Rdb Driver 3.1.0.0 problem with blobs

    I am trying to convert an MsAccess application to use an MsAccess front end and an Oracle Rdb back end.
    I've created the test database under VMS and can successfully link to the Oracle Rdb tables from MSAccess 2000. One of the main reasons for converting to Oracle Rdb is to be able to store large word documents in the database. I was able to do that using Oracle rdb Driver v 3.00.02.06. I recently converted to Oracle Rdb Driver version 3.1.0.0 and can no longer access the Blob field containing the Word document. MsAccess now sees this field as type ‘Binary’ and I keep getting an ‘invalid field type’ error. (with 3.00.02.06 this field was seen by MsAccess as an ‘Ole Object’ and the getchunk and appendchunk functions for getting and saving a blob worked reasonably well).
    Is this a bug in 3.1.0.0 or is there some way to get MsAccess to recognize this Binary field type?

    I suspect you'll need to contact Oracle support on this. There aren't, to my knowledge, any RDB folks around here.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

Maybe you are looking for

  • How do I find and redownload the books I bought?

    Low iTunes and content. Redownloaded. Can't find out how to redownload content, especially iBooks I bought. Can't find out how to sign in on iTunes. What happened to my content?

  • How to transfer Files from an iPod touch to a new computer?

    Hello all, recently i ran into some computer problems and my computer needed to be replaced. I did not keep my old computer. I want to transfer files such as notes, contacts, apps ect. to the new computer. I do not care about transfering music or pho

  • MacBook Pro mid2007 connecting to monitor

    Hi there. I am currently am using a MacBook Pro mid 2007 and was wondering it is possible to connect it to an external monitor and if so use it when closed without the comp going into sleep mode. Cheers.  Andy

  • Pre order $20 certs

    So is the pre order $20 certs just non existent anymore? As it was the $10 for best buy members and $10 for gamer club unlocked members. Cus I feel like that was a pretty big reason as to why I got the gamer club unlocked when it was first offered. I

  • Moving Clips - Frustration

    Coming from FCP I'm used to being able to pick a clip up on the timeline and move it (e.g. to early on the sequence) complete with audio.  As I pull the video clip up a track (in FCP) the Audio goes down a track (or two tracks for stereo pair) and I