Saturday, 4 April 2015

Openfire Server Tutorial

1 comment:

  1. Hola peeps,


    Hip Hip Hooray! I was always told that slightly slow in the head, a slow learner. Not anymore! It’s like you have my back. I can’t tell you how much I’ve learnt here and how easily! Thank you for blessing me with this effortlessly ingestible digestible content.


    I have some files sitting in SAN behind SQL. To retrieve it, in .NET this is what I do..

    first in the code, i run this
    command.CommandText = string.Format(@"SELECT FileContent.PathName(), GET_FILESTREAM_TRANSACTION_CONTEXT() FROM Files (nolock) WHERE Id = 179");

    once I get it, I dump it to a file like this -
    using (var sqlStream = new SqlFileStream(serverPath, serverTxn, FileAccess.Read))
    using (var fileStream = new FileStream(filePath, FileMode.Create, FileAccess.Write, FileShare.None))
    {.....}

    Now, how to do this in Java? Is there an SqlFileStream equivalent or any other way to achieve it?





    Thanks a lot. This was a perfect step-by-step guide. Don’t think it could have been done better.


    Thanks a heaps,
    Morgan

    ReplyDelete