Try a look on this:
http://www.cplusplus.com/doc/tutorial/files.html



On 9/4/07, Shannon Allen <[EMAIL PROTECTED]> wrote:
>
> I am trying to get comfortable using the lostream class for large
> objects.  I have a large binary file that I am storing in a BLOB that I
> can get back out using largeobjectaccess and then use the to_file(file)
> method to write it back out and that works fine.  However, I want to
> give users streaming functionality, but I need to know how to do it
> first :-) .
>
> What I would like to do first is stream this back out to a file, similar
> to what I've already done with largeobjectaccess::to_file(file), but
> instead I want to use lostream.
>
> Given this code, what do I need to do next?
>
> ...
>    pqxx::work w(*atr->getConn(),me);
>    pqxx::ilostream s(w, id5);
>
>    ofstream file("test.seqb", ios::out | ios::binary | ios::trunc);
>    cout << "Streaming blob into a file " << endl;
>
>    //This isn't right
>    if(s.good())
>    {
>       file << s;
>    }
>    cout << "Done Streaming blob into a file " << endl;
>    file.close();
> ...
> _______________________________________________
> Libpqxx-general mailing list
> [email protected]
> http://gborg.postgresql.org/mailman/listinfo/libpqxx-general
>



-- 
Hilton William Ganzo Perantunes
Sistemas de Informação - Universidade Federal de Santa Catarina
--
Dinheiro não traz felicidade, mas dá uma sensação tão parecida...  -_-
_______________________________________________
Libpqxx-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/libpqxx-general

Reply via email to