9f4537cda13c006129138a484ec56dab6a88554d
* harbour/contrib/hbodbc/odbc.c
! fixed length of string parameters passed to ODBC functions.
This code was using hb_parclen() for strings translated to other
encoding by O_HB_PARSTRDEF() - it's a bug - translation may completely
change the string length and the final ones can be shorter or longer
then value returned by hb_parclen(). The last parameter in these macro
is a pointer to HB_SIZE item which may received the size of converted
string and this value should be use. If some other code also uses
similar hb_parclen()/hb_itemGetCLen() for translated string (i.e.
code using hbwinuni.h macros) then it has to be fixed.
! fixed the code to respect manual call to SQLDisconnect() which
discards associated statement handles
% eliminated repeated calls to extract handles from pointer items
; TOFIX: add protection against calling SQLConnect() with hDbc handle
which is already in connected state. Possible solutions:
- forbid such operation
- execute SQLDisconnect() inside SQLConnect()
; TOFIX: hb_parc() pointer is passed as write buffer inside
SQLBindParameter()
; Please make real test. I made this modifications without any real
test. I do not have access to any ODBC server here.
Description
Harbour Core — Reference source for Five development
Languages
C
80.3%
xBase
17.8%
Makefile
0.6%
C++
0.4%
Harbour
0.4%
Other
0.3%