PDA

View Full Version : Help needed for Fetching entire database table from server



pranj1488
18th November 2011, 06:27
Hello,
I am trying to connect to the database residing on the local server and fetch entire database table to my application.
I am able to fetch single strings using QNetworkReply and then reading it into ByteArray using readAll() method of QNetworkReply.
Can anybody tell me how can I fetch entire database through the same QNetworkReply object?

Lesiok
18th November 2011, 07:18
Why You don't use QSql classes ?

pranj1488
18th November 2011, 07:28
hi, Lesiok
actually I'm retrieving entire contents of datatable on the serverside in a Qstring object through Outputstream object of my servelet file on server.
so can I display contents of this Qstring object in rows and columns format in widget like for example TableView?
How is it possible?

Lesiok
18th November 2011, 12:23
You must split this string to the list of rows. I can not help without knowing more about the format of this string.