Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Converting BLOB to different datatypes Expand / Collapse
Author
Message
Posted Friday, December 21, 2012 6:04 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 6:48 AM
Points: 2,507, Visits: 3,645

Hi Experts,

Is it possible to convert a java object which is now stored as a BLOB field to character values.
The java object in BLOB contains parent and child values ,we need to differentiate those.The blob value contains
some numbers, some charcters, some object itself this level of child objects may be more than 4-5 level

Is it possible and if yes then how?

Thanks in Advance.
Post #1399361
Posted Friday, December 21, 2012 6:40 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 9:25 AM
Points: 7,070, Visits: 12,523
Not unless you can deserialize the object using a SQLCLR object to review its properties, which I highly doubt. There is no native Java capability in SQL Server that would allow you to inspect that BLOB inside the database as if it were an object again, that I know of. You might be able to shoehorn the instantiation of a Java object into the scope of a SQLCLR object somehow by making an external call. Maybe you could have a SQLCLR object pass the BLOB to an external web service or executable for deserialization and inspection, but that would be terribly slow I would venture, if its even technically feasible. What you might want to start doing is storing the parent-child indicators in a separate column(s) next to the BLOB but you still have the problem of inspecting the existing data to initialize the new column(s).

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1399377
Posted Thursday, January 31, 2013 4:12 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 6:48 AM
Points: 2,507, Visits: 3,645
Thanks OPC
Post #1413982
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse