0

In our application which is completely in C++,we are using the Sybase libraries for firing select queries and after the connection is established we are fetching each row using next().

My query here is is there a way where we can fetch all the rows into our memory from sybase. like:

  • establish connection
  • select query
  • store the result completely in memory in any form
  • then try to access that memory
Mat
  • 202,337
  • 40
  • 393
  • 406
Vijay
  • 65,327
  • 90
  • 227
  • 319
  • Is the issue that you do not know in advance what the query is so you won't know the data type of a row result? If you do know the data type of the row result then you could just make your own equivalent struct (or class), allocate pools of memory for it and fill it as you go along with the next(). – j-a Nov 29 '11 at 11:39
  • so that means that we cannot at one go get all the data from the query output right? – Vijay Nov 29 '11 at 11:55
  • @j-a what sybase libraries are you using? – aF. Nov 30 '11 at 09:27
  • @aF my suggestion was not to use the Sybase library but to build a simple struct for the returned row, allocate a pool of the row-type-struct and populate them (from the next()). If the query is known in advance this is quick to implement and memory efficient. – j-a Dec 02 '11 at 10:55

0 Answers0