Problems while storing a BLOB

Hi
I need to store a blob in a MS Access db while receiving a mail, but I can't arrive!
This is my code, could anyone help me?
Many thanks in advance.
                         Blob blob = null;
                         PreparedStatement pst2 = con.prepareStatement("INSERT INTO TMail (Allegato, NomeAllegato) VALUES (?, ?)");
                         pst2.setBlob(1, blob);
                         pst2.setString(2, "prova");
                         pst2.executeUpdate();
                         con.commit();
                         PreparedStatement dbQuery = con.prepareStatement("SELECT Allegato " +
                                   "FROM TMail WHERE NomeAllegato = " + "'prova'"); //primaryKey);
               ResultSet rs = dbQuery.executeQuery();
               rs.next();
               blob = rs.getBlob("Allegato");
               OutputStream outstream = blob.setBinaryStream(1L);
                long size = blob.length(); // sarebbe getBufferSize()
                byte[] buffer1 = new byte[(int)size]; // occhio al cast!
                int length = -1;
                while((length = in.read(buffer1)) != -1)
                         outstream.write(buffer1, 0, length);
                outstream.close();
                PreparedStatement pst1 = con.prepareStatement("INSERT INTO TMail (Allegato) VALUES (?)");
                 pst1.setBlob(1, blob);
                 pst1.executeUpdate();
                 con.commit();
                 ... then I'm uploading the others fileds into a db.Maybe is possible to store the blob withut to reserve an empty space while uploading the others fields?

This post will not solve your problem.
However, MS Access IS NOT a database, it is an
application that mimics relational databasebehavior,
but a database it is not. There are formal definitions of databases and at
least to some extent MS Access meets the definition.I believe at to be a true database, you must provide for multiple users to access the db via network protocols, independent of the OS. Access doesnt do that. JMO.
>
Secondly, whenever I tried
to use MS Access and Java via the JDBC-ODBC Bridge
during my college career, I had nothing butproblems.
And which of the following did you have problems
with?
1. The ODBC driver itself?
2. Understanding what the bridge, the MS Access ODBC
driver and what MS Access allows?
3. Something else that has nothing to with MS Access
but instead might apply to any database?
Most of our problems were related to the JDBC-ODBC bridge and the underlying system DSN. We also had numerous problems after executing even the simplest of select querries, we would end up with empty result sets. Once we switched to MySQL and the Connector/J, the problems went away.
Another problem was the schools policy of not allowing us to save data on any computer. We could install software and save files, but as soon as the 'puter was turned off, the HDD was restored to the original image 'approved' by the school. For our senior capstone courses we were susposed to design, develop, and deploy a system to solve some problem. We were free to choose the topic. Given the computer policy it was a waste of time unless you used Microsoft Access. We couldnt even save DSN's on the schools puters nor change the time of the system.
Further, I did some research on the web and the
prevailing view I discovered was not to use MS
Access.I believe you will find many more opinions that you
shouldn't be using java but instead should be using
C# or C++.
So what language do you program in?Java 2 SE
>
hope you find a solution to your problem. In
addition, a small piece of advice for you in the
future would be to use MySQL (you can downloadfree)
and or Oracle 10g (also a free download). Presumably you are addressing the needs of a student,
because a business can not use Oracle for free. Even
a minimal install is quite expensive.Yes, I assumed this was a student project as the OP mentioned something about a test/project.
I am also guessing the OP's school is heavily vested with Microsoft's products such as the Office suite, Visual Studio, and even the class registration web sit did not function correctly without IE5 or better. I normally use Firefox and I always had to register using IE.
>
And I haven't checked recently but at one time that
was potentially true for MySQL as well.I believe MySQL uses a dual licensing model. If you develop a GPL open source application, its free. If you release some comercial product that uses MySQL, you must buy a license.
Most of the time I am using the DB's at home for educational / proof of concept type stuff. For school projects. I do not believe there is any problem. However, if the project is soo good that it can be comercially used, then by all means buy a license.
>
Both also require installs (of the database itself)
into the production environment. MS Access on a
windows box does not require that.
I dont understand what you are saying. MySQL runs fine on my laptop. Also whats to prevent a company from deploying to a test / development environment prior to roll out? Other than money that is.
Those are
both true databases. Please before anyone screams
at me about database X or Y... I know there are a
myriad of others out there but Oracle and MySQLare
the 2 biggest dogs out there competing with
Microsoft.
>
The competition with those would be MS SQL Server and
not MS Access. And MS SQL Server also is "free" at
least in the same way that Oracle is.Thats cool. The last time I had looked all the SQL server downloads were time limited to like 90 days. But that was several years ago.

Similar Messages

  • JNDI : connection problem while storing data more than one records

    I am persisting data into the MSSQL Server 2005 database using the JNDI lookup. I can insert the single record at a time, but when I ran the test program for 10 or 20 records i am getting the following exception on Jboss
    Configuration details : JBoss, Spring, MSSQL server 2005, Jdk 5
    JNDI mapping from JBOSS
    <?xml version="1.0" encoding="UTF-8"?>
    <datasources>
    <local-tx-datasource>
    <jndi-name>jdbc/myjndi</jndi-name>
    <!-- allows DS to be accessed remotely -->
    <use-java-context>false</use-java-context>
         <connection-url>jdbc:inetdae7:localhost:1434?database=myDB&secureLevel=0</connection-url>
         <driver-class>com.inet.tds.TdsDriver</driver-class>
         <user-name>sa</user-name>
         <password>admin123</password>
    <min-pool-size>5</min-pool-size>
    <max-pool-size>50</max-pool-size>
    <metadata>
         <type-mapping>MS SQLSERVER2000</type-mapping>
    </metadata>
    </local-tx-datasource>
    </datasources>
    Exception :
    14:07:06,812 INFO [myMDB] Exception while Storing Event in Database : Could not get JDBC Connection; nested exception is org.jboss.util.Neste
    dSQLException: Could not create connection; - nested throwable: (com.inet.tds.r: java.net.SocketExceptionjava.net.SocketException: Connection reset); - neste
    d throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.inet.tds.r: java.net.SocketExceptionjava.net.S
    ocketException: Connection reset))
    14:07:06,812 INFO [STDOUT] org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (com.inet.tds.r: java.net.SocketExceptionjava
    .net.SocketException: Connection reset); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (co
    m.inet.tds.r: java.net.SocketExceptionjava.net.SocketException: Connection reset))
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:107)
    14:07:06,812 INFO [STDOUT] at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:112)
    14:07:06,812 INFO [STDOUT] at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
    14:07:06,812 INFO [STDOUT] at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:177)
    14:07:06,812 INFO [STDOUT] at org.springframework.orm.ibatis.SqlMapClientTemplate.insert(SqlMapClientTemplate.java:356)
    14:07:06,812 INFO [STDOUT] at com.org.project.gen.MyDAOImpl.insert(MyDAOImpl.java:25)
    14:07:06,812 INFO [STDOUT] at com.org.project.geo.MyTabletDAO.addEvent(MyTabletDAO.java:137)
    14:07:06,812 INFO [STDOUT] at com.org.project.mdb.myMDB.onMessage(myMDB.java:72)
    14:07:06,812 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
    14:07:06,812 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    14:07:06,812 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
    14:07:06,812 INFO [STDOUT] at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:87)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:873)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1090)
    14:07:06,812 INFO [STDOUT] at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1392)
    14:07:06,812 INFO [STDOUT] at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
    14:07:06,812 INFO [STDOUT] at com.tibco.tibjms.TibjmsSession._submit(TibjmsSession.java:3567)
    14:07:06,812 INFO [STDOUT] at com.tibco.tibjms.TibjmsSession._dispatchAsyncMessage(TibjmsSession.java:1963)
    14:07:06,812 INFO [STDOUT] at com.tibco.tibjms.TibjmsSession._run(TibjmsSession.java:3054)
    14:07:06,812 INFO [STDOUT] at com.tibco.tibjms.TibjmsSession.run(TibjmsSession.java:4204)
    14:07:06,812 INFO [STDOUT] at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
    14:07:06,812 INFO [STDOUT] at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
    14:07:06,812 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
    14:07:06,812 INFO [STDOUT] Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.inet.tds.r: java.net.
    SocketExceptionjava.net.SocketException: Connection reset)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.
    java:161)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnection
    Pool.java:508)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:207)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:534
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:395)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:297)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:447)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManage
    r2.java:874)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:103)
    14:07:06,812 INFO [STDOUT] ... 33 more
    14:07:06,812 INFO [STDOUT] Caused by: com.inet.tds.r: java.net.SocketExceptionjava.net.SocketException: Connection reset
    14:07:06,812 INFO [STDOUT] at com.inet.tds.k.createSQLException(Unknown Source)
    14:07:06,812 INFO [STDOUT] at com.inet.tds.TdsConnection.a(Unknown Source)
    14:07:06,812 INFO [STDOUT] at com.inet.tds.TdsConnection.a(Unknown Source)
    14:07:06,812 INFO [STDOUT] at com.inet.tds.TdsConnection.<init>(Unknown Source)
    14:07:06,812 INFO [STDOUT] at com.inet.tds.q.<init>(Unknown Source)
    14:07:06,812 INFO [STDOUT] at com.inet.tds.k.createConnection(Unknown Source)
    14:07:06,812 INFO [STDOUT] at com.inet.tds.TdsDriver.connect(Unknown Source)
    14:07:06,812 INFO [STDOUT] at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.
    java:151)
    14:07:06,812 INFO [STDOUT] ... 41 more

    Hi Subin,
    You can try couple of things.
    If your data is less than 32767, you can pass it to stored procedure and change it to clob type like
    PROCEDURE CLOBQUERY
         Param     IN     CLOB,
    and you can call Procedure
    EXECUTE CLOBQUERY '[Param.1]'
    If your data is around than 1000000(32767*32), you can break the data in length of 32767 and pass it to param 1 to 32 like
    EXECUTE CLOBQUERY '[Param.1][Param.2][Param.3]..[Param.32]'
    Finally you can try to update jdbc drive.
    check the link Link: [JDBC Limitation|http://confluence.atlassian.com/display/JIRA/UsingOracle10gdriverstosolvethe4000character+limitation]

  • Problems while storing Timestamp into Max db

    Hai All,
         I am getting problem while inserting Timestamp into Maxdb
    Here iam giving Timestamp as input to the entityBean , and in database also i was taken that field as timestamp.
    the following is the code snippert,
    Date dte=new Date();
              Calendar c = Calendar.getInstance();
              java.sql.Timestamp t=new Timestamp(c.getTimeInMillis());
              try {
                   objTestingEntityLocalHome.create(strArg1,intarg2,dblDouble,t);
              } catch (CreateException e) {
                   return "Ex" +e;
              }catch (Exception e) {
                        return "Ex: "+e;
    whenever I run this program it is insering date correctly, but time stamp is  inserting incurrectly,it is not inserting current time stamp of the server
    anybody please help me inthis regard
    thanks
    somu

    Hi,
    try this:
    GregorianCalendar c = new GregorianCalendar();
    java.sql.Timestamp t=new Timestamp(c.getTimeInMillis());
    Good luck,
    Roelof

  • Problem in storing  as Blob in Oracle Database from java Program

    Hi All,
    Am trying to store an image of size 80000bytes into Oracle database using setBytes() anndsetBinaryStream() method but I'm unable to store in database.can u please tell me what are the various methods to store the Blob data into the database?
    the ways i'm trying to store in Database :
    1) cstmt.setBinaryStream(2, new ByteArrayInputStream(ltImageArr
    .get(i)), ltImageArr.get(i).length);
    2) cstmt.setBytes(2, ltImageArr.get(i)) ;
    waiting for reply
    please help me out

    hi !
    it seems to be a bug under Oracle 10.2, for which i used this workaround :
    PreparedStatement pstmt =
    con.prepareStatement("INSERT INTO blobtable VALUES (?)");
    Blob blob = BLOB.createTemporary(con, true, BLOB.DURATION_SESSION);
    OutputStream out = blob.setBinaryStream(0);
    out.write(byteValues);
    pstmt.setBlob(1, blob);
    i hope it will help you
    bye !

  • Unicode problem while storing properties

    Hi,
    I need to store the java.util.Properties object to a file.
    I'm using the store(OutputStream out, String header) method. and am using FileOutputStream.
    The values in Properties object contain unicode characters.
    In the output file, they are stored as \u00E4
    Please help me in handling this.
    Thanks and Regards,
    Janardan

    Thanks for the reply.
    But I want the output file to be with unicode characters.
    Can't i acheive it without using other tools like native2ascii etc.
    or, is there any other way to store these key value pairs to a file?

  • Problem while storing items from trailing list  to database

    hi all,
    can anyone help me out. i have scenario where i have to store items from trailing list into database. suppose if there are 3 items in the list, 3 rows should be inserted into database with all the remaining fields same like
    A ,1 , c
    A, 2, c
    A , 3, c where 1,2,3 are items from trailing list. Am iterating the loop.
    What am doing is before saving am checking for duplicates i.e are there any records with the same combination. If yes am doing nothing else am committing the changes..
    As am not doing anything if any duplicte record is present, the changes made to the fields persists and once if any commit happens all the values are getting saved. which is voilating my condition..
    Thanks

    Hello,
    Direct path load, can only be used with SQL*Loader and Database have the same version.
    Care to tell the database version and sql*loader version you are using.
    -Sri

  • Error while storing

    good day all i am facing problem while storing more then 4000 char in a table whose datatype is varchar2(4000)
    we use long datatype to solve this however while storing and retreiving we are facing the problem can any one assist ,
    appreciate your anticipation with your earliest
    Regards

    Obviously, you can't store more than 4000 characters in a varchar2(4000) column. Storing your data in a LONG column will solve this, though I'd highly recommend using CLOB rather than LONG. Oracle will probably drop the LONG type at some point since CLOB is so much nicer.
    Can you provide the precise error you're getting (including the ORA-xxxxx error number)? If you cuold post the code that's causing the error as well, that would be helpful.
    Justin

  • Problem displaying PDF stored in BLOB column

    Hello everyone.
    I've been trying to follow this tutorial http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::p11_question_id:232814159006 on displaying PDFs stored in BLOB columns. This is being performed on Apex 4.2, with my DB running 11g. I've got my procedure, which I'll post below:
    create or replace procedure "PDF" (p_id IN gvo_documents.doc_id%type)
    is
        l_lob    blob;
        l_amt    number default 30;
        l_off   number default 1;
        l_raw   raw(4096);
    begin
        select contents into l_lob
            from gvo_documents
             where doc_id = p_id;
    -- make sure to change this for your type!
        owa_util.mime_header( 'application/pdf' );
        begin
            loop
              dbms_lob.read( l_lob, l_amt, l_off, l_raw );
              htp.prn( utl_raw.cast_to_varchar2( l_raw ) );
              l_off := l_off+l_amt;
              l_amt := 4096;           
        end loop;
            exception
               when no_data_found then
                  NULL;
            end;
    end;
    I am trying to run this through a PL/SQL dynamic region and while I don't receive any error's, the content displayed is a huge mess of garbled text and odd characters. I've tried to run this procedure on numerous other document types, including word files and jpeg images, all with the necessary changes in my procedure, and regardless of what I use, I still get a large mess of strange characters. Does anyone have any information or ideas about why this is happening?

    If I understand correctly, your requirements needs to be broken down into two problems:
    1) click link that pops up a window displaying a new APEX page
    2) an APEX page the displays the document, not downloads it.
    I haven't done #1 (yet).
    However, you may be able to generate a URL that points to the new page as part of the SELECT statement for the Report.
    This has a related question, but no answer yet:
    open pdf in popup browser window
    The key is target="_blank" for the anchor tag.
    To generate the URL, you should use the APEX_UTIL.prepare_URL() function.
    If that doesn't work, a Dynamic Action that does some magical JavaScript stuff may be needed.
    For #2, I lost the URL that showed how to display a PDF as part of a "form" page.
    From what I remember:
    Start with a blank page with one blank HTML region (all the Items go in the HTML region)
    Add an Item for the PK/Doc_ID
    part I forgot Create a Data Manipulation Process
    - Automated Row Fetch
    - On Load - After Header
    - (stuff for your table/view)
    part I forgot Create an (I believe) "File Browser" item type. For Settings:
    - Storage Type "BLOB column specified in Item Source" (and place the column name of the BLOB there)
    - MIME Type Column: (column name) -- since you have multiple types, this is a MUST HAVE
    - Filename Column: (column name) -- I highly recommend you have this.
    - Content Disposition == INLINE <-- this is the kicker
    Also, you will need a Browser Plugin for each of the MIME Types (otherwise, the browser may try to 'download' the file)
    Browsers can handle Image types internally. Adobe's plugin can handle PDFs. I don't know about Word/Excel.
    Again, I don't remember the exact details, but that should cover most of it.
    MK

  • Problem in displaying images stored in Blob variable

    Hi all,
    I have a requirement where i need to retrieve the image stored in Blob variable in DB and display the image in JSP page.
    I have written the below code to achieve this, it works fine
    In JSP, I am calling a action in the <img tag
    <img src='downloadPhoto.page?method=getPhotoInBytes&accessoryModelPictures.id.accessoryNumber=${photo.id.accessoryNumber}/> In my controller class
    InputStream inputStream=accessoryPicturesLOB.getPicture().getBinaryStream();
    byte[] theBytes = new byte[inputStream.available()];
    inputStream.read(theBytes);
    response.setContentType("image/jpg");
    response.getOutputStream().write(theBytes);But the problem is, *if i right click on the image and select save picture as option i get a error saying "The system cannot find the specified file "*
    Can you please tell me what is wrong in my approach/code
    Is there any better approach to display image that is store in Blob variable ?
    Please help on this.
    Thanks in advance.

    You need at least to set the filename in the content disposition header.

  • Memory leak problem while passing Object to stored procedure from C++ code

    Hi,
    I am facing memory leak problem while passing object to oracle stored procedure from C++ code.Here I am writing brief description of the code :
    1) created objects in oracle with the help of "create or replace type as objects"
    2) generated C++ classes corresponding to oracle objects with the help of OTT utility.
    3) Instantiating classes in C++ code and assigning values.
    4) calling oracle stored procedure and setting object in statement with the help of setObject function.
    5) deleted objects.
    this is all I am doing ,and getting memory leak , if you need the sample code then please write your e-mail id , so that I can attach files in reply.
    TIA
    Jagendra

    just to correct my previous reply , adding delete statement
    Hi,
    I am using oracle 10.2.0.1 and compiling the code with Sun Studio 11, following is the brief dicription of my code :
    1) create oracle object :
    create or replace type TEST_OBJECT as object
    ( field1 number(10),
    field2 number(10),
    field3 number(10) )
    2) create table :
    create table TEST_TABLE (
    f1 number(10),f2 number (10),f3 number (10))
    3) create procedure :
    CREATE OR REPLACE PROCEDURE testProc
    data IN test_object)
    IS
    BEGIN
    insert into TEST_TABLE( f1,f2,f3) values ( data.field1,data.field2,data.field3);
    commit;
    end;
    4) generate C++ classes along with map file for database object TEST_OBJECT by using Oracle OTT Utility
    5) C++ code :
    // include OTT generate files here and other required header files
    int main()
    int x = 0;
    int y = 0;
    int z =0;
    Environment *env = Environment::createEnvironment(Environment::DEFAULT);
    Connection* const pConn =
    env->createConnection"stmprf","stmprf","spwtrgt3nms");
    const string sqlStmt("BEGIN testProc(:1) END;");
    Statement * pStmt = pConn->createStatement(sqlStmt);
    while(1)
    TEST_OBJECT* pObj = new TEST_OBJECT();
    pObj->field1 = x++;
    pObj->field2 = y++;
    pObj->field3 = z++;
    pStmt->setObject(1,pObj);
    pStmt->executeUpdate();
    pConn->commit();
    delete pObj;
    }

  • HT201210 how to solve the problem while re storing iphone 3gs. unknon erron occured(29)

    How to solve the problem while restoring iphone 3gs? (unknon error occured (29)

    Hello Musthafa K.O.M,
    Thank you for using Apple Support Communities.
    For more information, take a look at:
    Resolve specific iTunes update and restore errors
    http://support.apple.com/kb/ts3694#47
    Check for hardware issues
    Try to restore your iOS device two more times while connected with a cable, computer, and network you know are good. Also, confirm your security software and settings are allowing communication between your device and update servers. If you still see the alert when you update or restore, contact Apple support.
    Common errors: 1, 10-47, 1002, 1011, 1012, 1014, 1000-1020.
    Have a nice day,
    Mario

  • Swing/bc4j - not visible gif stored in blob thru forms

    I have problem with displaying gifs stored in blob column through Forms. If the very same files are stored through swing client they are visible in both swing and forms application.
    In thread Displaying jpeg in JSP I saw that the reason for irregular blob behaviour could be its "forms background". What is exactly problem?
    Is it possible to update blob column in database somehow (reloading over 2000 gifs will be pretty uncomfortable and slow) ?
    I am using JDev 9.0.5.1 build 1605, DB 8.1.7., Forms 6i.

    It appears that Forms, while storing gifs, uses compression apparently not handled by JUImageControl. More on Metalink 16035040.6

  • Problem while creating xml with cdata section

    Hi,
    I am facing problem while creating xml with cdata section in it. I am using Oracle 10.1.0.4.0 I am writing a stored procedure which accepts a set of input parameters and creates a xml document from them. The code snippet is as follows:
    select xmlelement("DOCUMENTS",
    xmlagg
    (xmlelement
    ("DOCUMENT",
    xmlforest
    (m.document_name_txt as "DOCUMENT_NAME_TXT",
    m.document_type_cd as "DOCUMENT_TYPE_CD",
    '<![cdata[' || m.document_clob_data || ']]>' as "DOCUMENT_CLOB_DATA"
    ) from table(cast(msg_clob_data_arr as DOCUMENT_CLOB_TBL))m;
    msg_clob_data_arr is an input parameter to procedure and DOCUMENT_CLOB_TBL is a pl/sql table of an object containing 3 attributes: first 2 being varchar2 and the 3rd one as CLOB. The xml document this query is generating is as follows:
    <DOCUMENTS>
    <DOCUMENT>
    <DOCUMENT_NAME_TXT>TestName</DOCUMENT_NAME_TXT>
    <DOCUMENT_TYPE_CD>BLOB</DOCUMENT_TYPE_CD>
    <DOCUMENT_CLOB_DATA>
    &lt;![cdata[123456789012345678901234567890123456789012]]&gt;
    </DOCUMENT_CLOB_DATA>
    </DOCUMENT>
    </DOCUMENTS>
    The problem is instead of <![cdata[....]]> xmlforest query is encoding everything to give &lt; for cdata tag. How can I overcome this? Please help.

    SQL> create or replace function XMLCDATA_10103 (elementName varchar2,
      2                                             cdataValue varchar2)
      3  return xmltype deterministic
      4  as
      5  begin
      6     return xmltype('<' || elementName || '><![CDATA[' || cdataValue || ']]>
      7  end;
      8  /
    Function created.
    SQL>  select xmlelement
      2         (
      3            "Row",
      4            xmlcdata_10103('Junk','&<>!%$#&%*&$'),
      5            xmlcdata_10103('Name',ENAME),
      6            xmlelement("EMPID", EMPNO)
      7         ).extract('/*')
      8* from emp
    SQL> /
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[SMITH]]></Name>
      <EMPID>7369</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[ALLEN]]></Name>
      <EMPID>7499</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[WARD]]></Name>
      <EMPID>7521</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[JONES]]></Name>
      <EMPID>7566</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[MARTIN]]></Name>
      <EMPID>7654</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[BLAKE]]></Name>
      <EMPID>7698</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[CLARK]]></Name>
      <EMPID>7782</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[SCOTT]]></Name>
      <EMPID>7788</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[KING]]></Name>
      <EMPID>7839</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[TURNER]]></Name>
      <EMPID>7844</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[ADAMS]]></Name>
      <EMPID>7876</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[JAMES]]></Name>
      <EMPID>7900</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[FORD]]></Name>
      <EMPID>7902</EMPID>
    </Row>
    <Row>
      <Junk><![CDATA[&<>!%$#&%*&$]]></Junk>
      <Name><![CDATA[MILLER]]></Name>
      <EMPID>7934</EMPID>
    </Row>
    14 rows selected.
    SQL>

  • Long text problem while uploading Inspection plan through BDC.

    Hi,
    I am facing some problem while uploading the inspection plan. There are few MICs for which we are having long text, while uploading the inspection plan through BDC - some other long text is getting copied into the MIC's long text. After checking I came to know that in function module, read_text - some text which is stored in ABAP memory is getting copied into the inspection plan.
    I am working in SAP release 4.7. I have checked with SAP notes: 97419, but it is also not satisfying.
    Waiting for quick solution.
    Thanks in advance.
    Fahié

    Hi a®s,
    Thanks a lot for your kind reply.
    My requirement is I want to maintain long text for few MICs (which are not having long texts at MIC level) in inspection plan (QP01).
    When I am trying to manually assign the MIC's to inspection plan (QP01), long text is copied whereas I am not clicking the long text icon in (QP01). Long text is not maintained in MIC level, still some long text is copied to this MIC. This was also happening while uploading the inspection plan thro' BDC.
    I believe what you have mentioned about function module SAVE_TEXT cannot be used here since long text is already copied before we pass the long text. Also if we pass some long text, still apart from the long text what we have passed there is some other long text copied (extra long text).
    Waiting for quick solution.
    Thanks in advance.
    Fahié

  • Hi Experts , I am currently facing problems while running restricted version copy .. The log says 0 location products copied and that the process has has timed out. the error message is /SAPAPO/MVM_INT_SVC_CO_VER_LCW reported exception in task DP00014, th

    Hi Experts , I am currently facing problems while running restricted version copy in sap apo .. The log says 0 location products copied and that the process has timed out. the error message is " /SAPAPO/MVM_INT_SVC_CO_VER_LCW reported exception in task DP00014 " , then ending in time limit exceeded. could anyone explain why this happens. please note even if the log says 0 location products copied , in reality they have have been partially copied.
    Regards
    Jerel

    Hi, thank you for your replies, I found out few things about my servlet, and its portability
    and i have few questions, although i marked this topic as answered i guess its ok to post
    I am using javax.servlet.context.tempdir to store my files in that servletcontext temporary directory. But i dont know how to give hyperlink
    of the modified files to the user for them to download the modified files.
    What i am using to get the tempdir i will paste
    File baseurl = (File)this.getServletContext().getAttribute("javax.servlet.context.tempdir");
    System.out.println(baseurl);
    baseurl = new File(baseurl.getAbsolutePath()+File.separator+"temp"+File.separator+"files");
    baseurl.mkdirs();so i am storing my files in that temp/files folder and the servlet processes them and modifies them, then how to present them as
    links to the user for download ?
    and as the servlet is multithreaded by nature, if my servlet gets 2 different requests with same file names, i guess one of them will be overwritten
    And i want to create unique directory for each request made to the servlet , so file names dont clash.
    one another thing is that i want my servlet to be executed by my <form action> only, I dont want the user to simply type url and trigger the servlet
    Reply A.S.A.P. please..
    Thanks and regards,
    Mihir Pandya

Maybe you are looking for

  • Eyedropper tool doesn't work in Index Mode

    When I am in Index mode, and I bring up the color table, the eyedropper tool doesn't work unless I right-click and choose one of the point sample averages. And even then, it doesn't always work unless I hit some combination of Shift-control-option-co

  • HT4993 after i updated to 6.0..

    my phone wont connect to network and its a brand new phone... i had this problem before when i switched phones while mine was supposed to be getting the screen repaired. it didnt get fixed, but when i got the phone back i could not activate my phone

  • Analyzing large TDMS files in time invervals

    We have TMDS files that are several hours long (sampled at 1024 S/s). We would like to measure the number of zero crossings and peaks in blocks one second long over the entire recording.  I can see that FFT has a Time Interval function, but I don't s

  • Custom text for JMenu and JMenuItem

    hey guys right now i can do a : JMenu menu = new JMenu("File");but how can i customize the text on the Menu a.k.a "file" so may be it looks bigger or a different color ? ive looked at the API i can see that JMenu takes "Action" object too which descr

  • Datatable: How to limit entries (paging)?

    Hello Guys, I am having a question to datatables (I am using the sun reference implementation). How is it possible to create a datatable with just 10 or 20 entries. Below that table I would like to have links for more pages like: [datatable] <<(prev