1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
...
strSQL = (SQLCHAR *) "SELECT AA_COD, ROUND(PU_BASE * 100), ROUND(SUPPLEMENT * 100), DT_MODIF, nb_dents, age_min, age_max FROM R_ACTE_IVITE_PHASE ORDER BY AA_COD, DT_MODIF";
retcode = SQLExecDirect (hstmt, strSQL, SQL_NTS);
if (retcode != SQL_SUCCESS)
return FALSE;
i = 0;
count = 0;
retcode =SQLBindCol (hstmt, 1, SQL_CHAR, code_acte, sizeof (code_acte), &i);
retcode =SQLBindCol (hstmt, 2, SQL_C_SLONG, &prix_base, sizeof (prix_base), &i);
retcode =SQLBindCol (hstmt, 3, SQL_C_SLONG, &supplement, sizeof (supplement), &i);
retcode =SQLBindCol (hstmt, 4, SQL_C_TYPE_DATE, &date_debut, sizeof (date_debut), &i);
retcode =SQLBindCol (hstmt, 5, SQL_C_SLONG, &nb_dents, sizeof (nb_dents), &i);
retcode =SQLBindCol (hstmt, 6, SQL_C_SLONG, &age_min, sizeof (age_min), &i);
retcode =SQLBindCol (hstmt, 7, SQL_C_SLONG, &age_max, sizeof (age_max), &i);
while ((retcode = SQLFetch (hstmt)) == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO)
{
sqldate2ingedate (&Date_tmp, &date_debut);
while ((memcmp (code_acte, Actes[count].code_acte, 7) != 0)
|| (Date_tmp.jour != Actes[count].modif.jour
|| Date_tmp.mois != Actes[count].modif.mois || Date_tmp.annee != Actes[count].modif.annee))
count++;
Actes[count].pu_base = UINT32_SWAP_LE_BE (prix_base);
Actes[count].supplement = UINT32_SWAP_LE_BE (supplement);
Actes[count].nb_dents = (int8) nb_dents;
Actes[count].age_min = (int8) age_min;
Actes[count].age_max = (int8) age_max;
count = 0;
...
} |
Partager