Problem with SQL FETCH
-
Hi, I have some problem with this query i execute under visual C++6.0
"SELECT Nom, CodePostal, Sum(Montant) AS MontantRemb, DateTraitement FROM TClient GROUP BY Nom, CodePostal, Montant,DateTraitement HAVING (((DateTraitement)=#09/05/2002#));"
In Microsoft Access interface it work well but if i execute it via ODBC like this :retcode = SQLExecDirect(m_hstmt,(SQLCHAR*)strSQL, SQL_NTS);
this isntruction work also but i have a problem with SQL Fetch:while (( retcode = SQLFetch(m_hstmt))!= SQL_NO_DATA) { SQLGetData(m_hstmt, 1, SQL_C_CHAR, szNomClient, 25, &cbName); SQLGetData(m_hstmt, 2, SQL_C_CHAR, szCodePostal, 6, &cbName); SQLGetData(m_hstmt, 3, SQL_C_CHAR, szMontant, 16, &cbName); SQLGetData(m_hstmt, 4, SQL_C_CHAR, szDateTraitement, 11, &cbName); }
Here retcode return 100 and i can't obtain my data Thanks in advance for any help