Ecere SDK/eC Forums
http://ecere.org/community/
Print view

Fetch all recordset from ODBC
http://ecere.org/community/viewtopic.php?f=1&t=341
Page 2 of 2
Author:  jerome [ Thu Dec 06, 2012 12:29 am ]
Post subject:  Re: Fetch all recordset from ODBC

Well you could certainly count the number of rows beforehand, SQL lets you do SELECT COUNT(*)...

But if you don't you can use the dynamic Array class and just use Add() to increase the size as you add each row. If you use just the pointer (String **) then you need to re-allocate the memory for the pointer (renew in eC: array = renew array String*[newRowsCount]).

-Jerome
All times are UTC-05:00 Page 2 of 2