PDA

View Full Version : Reading & Writing to File with qt3.3.4 , Please help me in detail



joseph
27th February 2006, 07:30
Good Morning Guys

I have a big problem with the year ending process . ie; at the financial year ending time we are planning to create a new database [ in postgresql ] by renaming the old - database .
In the old-database i have a table called tbl_stock_on_hand ,from which we can indentify Each Products Current-Stock .

My problem is to transfere this Current-Stock of Individual Product from Old-Database to the New database as OPENING STOCK to individual items

How it is possible ...........? please help me it's very urgent

jacek
27th February 2006, 09:13
Just dump the data to a file and then load it to the new database or use dblink function.

joseph
27th February 2006, 12:11
hai jacek

Thank u very much for ur reply. Actually i was about to try this using file . Now i have one need .how i can simply write this data to file and how i can fetch the same from it and insert to the new database
:confused:

joseph
27th February 2006, 12:50
Is there any body to help me in file transactions , if u can please sent an simple example code for writing & read a file in Qt 3.3.4 . Actually my need is to
=> fetch data from postgresql old-databse
=> then store the data in a dynamically created file [ say tmp.txt ]
=> then create a new database using shellScript
=> then restrore the data from file to new-database

wysota
27th February 2006, 12:56
=> fetch data from postgresql old-databse
=> then store the data in a dynamically created file [ say tmp.txt ]
=> then create a new database using shellScript
=> then restrore the data from file to new-database

And how are these related to reading and writing using a file? If you ask specific questions, you'll get specific answers. For a general question of yours I can give you a general answer -- use QFile class.

zlatko
27th February 2006, 13:03
And how are these related to reading and writing using a file? If you ask specific questions, you'll get specific answers. For a general question of yours I can give you a general answer -- use QFile class.

Answer for next level questions - use QSqlDatabase :)

jacek
27th February 2006, 13:47
Please, don't start multiple threads on the same problem.