The 201032 - bit project transplanted
OBDC succeeded when
Back to the value of the SQLFETCH (scarlet letter below) error - 1
Could you tell me how to solve a great god
Int CDbAbsotime: : DbGetAbsotimeSetArray (cstrings, where DbAbsotimeSetArray& Array)
{
Cstrings SQL;
HSTMT HST.
RETCODE rc;
SQLLEN cb.
//こ こ で の MDB に outside you pick 続 す る の を check め る=& gt; こ こ で の obtain は meet 続 し て い る DB か ら に more
-//unique moral issue? Phase period of seaborne を obtain す る MDB は will ず 1 の MDB (PlusI100_1. MDB) と す る こ と!
//1 の MDB (PlusI100_1. MDB) exist が し な い occasions は エ ラ ー
//cstrings mdbFileName="";
//if (! GetMdbFileName (1, mdbFileName)) return FALSE;
//cstrings DbBasePWD; DbBasePWD. LoadString (IDC_DB_PWD);
//cstrings tableName="pi_absotime";
//cstrings TBL. TBL. The Format (" [DATABASE=% s; PWD=% s], [% s] ", mdbFileName, DbBasePWD, tableName);
Pi_absotime cstrings TBL=_T (" ");
SQL=_T (" SELECT ");
SQL +=_T (" soutaiki, time_s, time_e, zettaiki ");
SQL +=_T (" FROM ");
SQL +=TBL;
SQL +=where;
If (DoSQL (SQL, & amp; HST)) {
return FALSE;
}
DbAbsotimeSet absotimeSet;
Int seq=1;
//once the numerical type は char へ FETCH す る
Char soutaiki [32].
Char time_s [32].
Char time_e [32].
Char zettaiki [32].
SQLBIND (HST, seq, SQL_C_CHAR soutaiki, 1, & amp; Cb); Seq++;
SQLBIND (HST, seq, SQL_C_CHAR time_s, 1, & amp; Cb); Seq++;
SQLBIND (HST, seq, SQL_C_CHAR time_e, 1, & amp; Cb); Seq++;
SQLBIND (HST, seq, SQL_C_CHAR zettaiki, 1, & amp; Cb); Seq++;
Array. RemoveAll ();
While (1) {
Sprintf (soutaiki, _T (" % d "), 0).
Sprintf (time_s, _T (" % d "), 0).
Sprintf (time_e, _T (" % d "), 0).
Sprintf (zettaiki, _T (" % d "), 0).
Memset (& amp; AbsotimeSet, NULL, sizeof (absotimeSet));
rc=SQLFETCH (HST);
If (SQLERROR (rc)) break;
//char numerical を the numerical に variations in し て constructs へ
AbsotimeSet. Soutaiki=atoi (soutaiki);
AbsotimeSet. Time_s=atoi (time_s);
AbsotimeSet. Time_e=atoi (time_e);
AbsotimeSet. Zettaiki=atoi (zettaiki);
Array. The Add (absotimeSet);
}
SQLDELHST (HST);
Return array. GetSize ();
}//End of DbGetAbsotimeSetArray
CodePudding user response:
https://docs.microsoft.com/zh-cn/sql/odbc/reference/syntax/sqlfetch-function? View=SQL server - ver15