Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread
Message: 95395
BY: Mario Briggs (mbriggs)
DATE: 2010-12-01 06:02
SUBJECT: RE: Blobs not being saved

 

2.5.5 rules out my hypothesis, so the CLI trace will help and i will let Praveen proceed in helping you.

BTW i think if i give you hints on how BLOBS is handled, it might rings a few bells...
the default behaviour when LOBS are involved is to dump a indicator like @@@IBM_@@@@ into the column and then immediately after the insert, update it with the actual LOB value. The reason for this strange mumbo-jumbo, is that ROR does not use parameterized queries and with LOB values, you might overrun the max length an SQL string can be. Thus we first dump the indicator and then use another 'update SQL' with parameter markers filtered by pkey.

If the above has not scared you already and you are still willing to work with ROR, well you have lived to see the best part. Since 2.0. of the gem, Praveen worked brilliantly to add support for parameterized queries to ROR when used with DB2. See #3 in this blog and the article it points to - http://programmingzen.com/2010/01/21/db2-support-for-rubyrails-turns-2-0/

the side-effects of this is that when turn on parameterized queries (not the default), all the above strange mumbo-jumbo of LOB handling is gone, becuase we are using parameterized values for the LOBS.

thanks
Mario


Thread View

Thread Author Date
Blobs not being savedSimon Macneall2010-12-01 02:27
      RE: Blobs not being savedPraveen Devarao2010-12-01 03:58
            RE: Blobs not being savedMario Briggs2010-12-01 05:16
                  RE: Blobs not being savedSimon Macneall2010-12-01 05:23
                        RE: Blobs not being savedMario Briggs2010-12-01 06:02
            RE: Blobs not being savedSimon Macneall2010-12-01 08:04
                  RE: Blobs not being savedSimon Macneall2010-12-01 08:34
                        RE: Blobs not being savedPraveen Devarao2010-12-02 06:17
                              RE: Blobs not being savedSimon Macneall2010-12-02 08:42
                                    RE: Blobs not being savedPraveen Devarao2010-12-03 05:09
                                          RE: Blobs not being savedSimon Macneall2010-12-03 06:07
                                                RE: Blobs not being savedPraveen Devarao2010-12-03 06:26
                                          RE: Blobs not being savedSimon Macneall2010-12-03 06:41
                                                RE: Blobs not being savedPraveen Devarao2010-12-03 08:06
                                                      RE: Blobs not being savedSimon Macneall2010-12-10 04:37

Post a followup to this message