Skip to content

Commit 539b736

Browse files
committed
Merge branch 'ob-10.0' into 10.0
2 parents 31d2c02 + 02fa3b8 commit 539b736

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

storage/connect/tabodbc.cpp

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* COPYRIGHT: */
77
/* ---------- */
8-
/* (C) Copyright to the author Olivier BERTRAND 2000-2015 */
8+
/* (C) Copyright to the author Olivier BERTRAND 2000-2016 */
99
/* */
1010
/* WHAT THIS PROGRAM DOES: */
1111
/* ----------------------- */
@@ -912,19 +912,21 @@ bool TDBODBC::OpenDB(PGLOBAL g)
912912
if ((n = Ocp->GetResultSize(Query->GetStr(), Cnp)) < 0) {
913913
strcpy(g->Message, "Cannot get result size");
914914
return true;
915-
} // endif n
915+
} else if (n) {
916+
Ocp->m_Rows = n;
916917

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
918924

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;
925927

926-
Ocp->m_Rows = 0;
927-
} else
928+
Ocp->m_Rows = 0;
929+
} else
928930
return true;
929931

930932
} // endif Memory

0 commit comments

Comments
 (0)