• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Fetch Problems

ProjectRoom

Well Known Member
ok I can get the number of columns in a table by using:

int NumberCols = JDB_GetNumColumns(hHeaderRequest);

but now I can not seem to retrieve the table data properly.

using F0101 for testing, I can get the first column data fine. If I use:

char Data[2000];
JDEDBSelectAll(hHeaderRequest);
for ( int i = 0; i < 50; i++ ) {
if ( JDB_Fetch(hHeaderRequest, &Data, (int)0) != JDEDB_PASSED ) { return; }
else { ListBox_AddString(Results, Data); }
}

but i need the other column data and the ability to get the column name and the size and index of the column, e.g. i can get the 5th column and get the name and data in the column.

I need some guidance. I am experiementing with :

LPTABLECACHE TableCache = (LPTABLECACHE) NULL;
LPGLOBALCOLS TableCols = (LPGLOBALCOLS) NULL;

JDBRS_GetTableSpecs(hUser, "F0101", &TableCache, '1', (void *) NULL);
if ( !TableCache ) { ListBox_AddString(Results, "SPECS FAILED"); return; }
TableCols = (LPGLOBALCOLS) TableCache->lpColumns;

I can get the TableCache, I can't seem to retrieve the column infomation. What function do I use to get the column data?


Cheers

PR

[ B7.3.3.2 ][ SP 11.3 ][ NT 4.0 ][ AS/400 co-existance ]
 
Top