|
This is a multipart message in MIME format. -- [ Picked text/plain from multipart/alternative ] Hi all, i've a big wish on you ... i've a problem with DB2 CLI in C ! im'trying to read data from DB and write their in another IFS file... The problem is, that when i'm reading CHAR data its no problem !!! But if i'm trying to read decimal or another typ then i'll got nothing and in joblog is a message "Host variable *N not compatible" ... How could i read data from another types, or convert they to string buffer in C ?! here is a peace from my code : ... chk = SQLDescribeCol(hstmt,i+1,colname,sizeof(colname),&colnamelen, &coltype, &collen[i], &scale, &nullable); chk = SQLColAttributes(hstmt,i+1,SQL_DESC_LENGTH,NULL,0,NULL, &displaysize); alc_data[i]=(SQLCHAR *) malloc(sizeof(SQLCHAR) * displaysize); chk =SQLBindCol(hstmt, i+1,SQL_CHAR, (SQLPOINTER) alc_data[i], collen[i],&rlength); ... while ((rc=SQLFetch(hstmt)) != SQL_NO_DATA_FOUND) { for (x=0;x<=colsn;x++) { sprintf(record, " %s\n", alc_data[x]); fputs(record, out_file); ... Please, please help who can ... !!! Thank you Peter
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.