File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change 5
5
/* */
6
6
/* COPYRIGHT: */
7
7
/* ---------- */
8
- /* (C) Copyright to the author Olivier BERTRAND 2000-2015 */
8
+ /* (C) Copyright to the author Olivier BERTRAND 2000-2016 */
9
9
/* */
10
10
/* WHAT THIS PROGRAM DOES: */
11
11
/* ----------------------- */
@@ -912,19 +912,21 @@ bool TDBODBC::OpenDB(PGLOBAL g)
912
912
if ((n = Ocp->GetResultSize (Query->GetStr (), Cnp)) < 0 ) {
913
913
strcpy (g->Message , " Cannot get result size" );
914
914
return true ;
915
- } // endif n
915
+ } else if (n) {
916
+ Ocp->m_Rows = n;
916
917
917
- Ocp->m_Rows = n;
918
+ if ((Qrp = Ocp->AllocateResult (g)))
919
+ Memory = 2 ; // Must be filled
920
+ else {
921
+ strcpy (g->Message , " Result set memory allocation failed" );
922
+ return true ;
923
+ } // endif n
918
924
919
- if ((Qrp = Ocp->AllocateResult (g)))
920
- Memory = 2 ; // Must be filled
921
- else {
922
- strcpy (g->Message , " Result set memory allocation failed" );
923
- return true ;
924
- } // endif n
925
+ } else // Void result
926
+ Memory = 0 ;
925
927
926
- Ocp->m_Rows = 0 ;
927
- } else
928
+ Ocp->m_Rows = 0 ;
929
+ } else
928
930
return true ;
929
931
930
932
} // endif Memory
You can’t perform that action at this time.
0 commit comments