HBODBC atualizações e correções
Enviado: 07 Jul 2014 11:00
Acredito que o Viktor ainda faça mais ajustes.
Eu estou postando estas mudanças, porque considero de interesse da comunidade sempre que existem correções na parte que lida com banco de dados.
Saudações,
Itamar M. Lins Jr.
Eu estou postando estas mudanças, porque considero de interesse da comunidade sempre que existem correções na parte que lida com banco de dados.
Código: Selecionar todos
2014-07-07 12:38 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
* contrib/hbodbc/todbc.prg
* TODBC():RecCount() method deprecated with HB_LEGACY_LEVEL4
Use indentical TODBC():LastRec() instead
* contrib/hbodbc/hbodbc.hbp
* contrib/hbodbc/browodbc.prg -> contrib/hbodbc/browse.prg
* source renamed
* contrib/hbodbc/tests/odbc.prg
* contrib/hbodbc/tests/odbccall.prg
* contrib/hbodbc/tests/todbc.prg
* cleanups, variables naming
+ more odbccall output
* doc/en/rdddb.txt
* src/rdd/dbcmd.c
* tests/cdx.prg
* tests/db_brows.prg
* tests/newrdd.prg
* utils/hbmk2/hbmk2.prg
* use LastRec() instead of RecCount() (latter was deprecated in C5.x)
2014-07-07 03:30 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
* contrib/hbodbc/browodbc.prg
* contrib/hbodbc/hbodbc.hbx
* contrib/hbodbc/odbc.c
* hb_odbcSToD( s ) deprecated with HB_LEGACY_LEVEL5.
Replace it with this expression: hb_CToD( s, "yyyy-mm-dd" )
* contrib/xhb/xhbmsgs.c
* formatting
2014-07-07 03:12 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
* contrib/hbodbc/tests/*.prg
% cleanups and optimizations
* CONTRIBUTING.md
* cleanup
2014-07-07 03:00 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
* contrib/hbodbc/browodbc.prg
* contrib/hbodbc/hbodbc.hbx
* contrib/hbodbc/tests/todbc.prg
* contrib/hbodbc/todbc.prg
% TODBC() optimized to call ::ClearData() only
when necessary
* BrowseODBC() renamed to hb_odbcBrowse()
Old function available under HB_LEGACY_LEVEL5
+ hb_odbcBrowse() headsep like in Browse()
* demo to use AChoice() instead of MENU TO
* some variable name cleanup
2014-07-07 02:27 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
* contrib/hbodbc/browodbc.prg
! BrowseODBC(): fixed RTE with dimensions not passed
! BrowseODBC(): fixed visual glitches in status info
! BrowseODBC(): fixed infinite loop when moving past BOF
* contrib/hbodbc/tests/todbc.prg
+ use BrowseODBC()
* contrib/hbodbc/sql.ch
+ added missing types
+ added missing error codes
+ added SQL_SUCCEEDED() macro to check for SQL API
call success like in sql.h
* contrib/hbodbc/todbc.prg
+ use SQL_SUCCESS() macro
+ use hb_StrFormat() to form error message
+ TODBC():LoadData(), :ClearData() and :Fetch()
are now PROTECTED methods [INCOMPATIBLE]
2014-07-07 00:59 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
* contrib/hbodbc/todbc.prg
* TODBC():LoadData() will not AllTrim() the field values
anymore for SQL_LONGVARCHAR types.
Caller can do this easily, when needed (with the minor
inconvenience that right spaces in original varchar value
are lost).
* TODBC():LoadData() will now PadR() _all_ string types
* TODBC():LoadData() to pad empty strings to the full field
width in case of error
* TODBC():LoadData() to return empty string instead of NIL,
after today's changes
+ TODBCField():New() now accepts various init params
* TODBCField() changed default/init object var values
* fixed to return padded empty string field values instead
of NIL in certain error conditions
% TODBC():Open(): SQLRowCount() call deleted, because the
result was unused
% TODBC():FieldByName() minor optimization
* various minor code cleanups/optimizations
; May be [INCOMPATIBLE]
* contrib/hbodbc/odbc.c
* contrib/sddodbc/core.c
% optimized to use hb_storclen_buffer()/hb_itemPutCLPtr()
for binary strings after prev commit
* contrib/hbodbc/tests/odbccall.prg
+ more minor extensions
* contrib/hbformat/hbfmtcls.prg
* contrib/hbnf/aredit.prg
* contrib/hbpgsql/tests/cache.prg
* contrib/xhb/dumpvar.prg
* contrib/xhb/trpc.prg
* src/debug/dbgtobj.prg
* src/debug/debugger.prg
* src/rdd/usrrdd/rdds/hscdx.prg
* src/rdd/usrrdd/rdds/rlcdx.prg
* src/rtl/objfunc.prg
* tests/db_brows.prg
* tests/gtkeys.prg
* tests/hsx.prg
* tests/rddtest/rddtst.prg
* prefer 'AScan() > 0' over 'AScan() != 0'
2014-07-06 19:06 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
* contrib/hbodbc/todbc.prg
* contrib/hbodbc/tests/todbc.prg
! fixed TODBC():Open() to not return an empty record
before the first movement
% optimizations
* contrib/hbodbc/browodbc.prg
% optimization
* contrib/hbodbc/tests/odbccall.prg
+ extended a bit
* contrib/hbodbc/odbc.c
* contrib/hbodbc/todbc.prg
! fixed a likely typo in a copyright year
2014-07-06 16:40 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
* contrib/hbodbc/odbc.c
+ SQLGETDATA() rewritten to
- not ignore the data type requested by the caller
(was fixed to SQL_CHAR before)
- to properly handle UNICODE field values
- to properly read binary data (it may have trimmed
data after the first zero byte before)
- use <nLen> parameter as an optional maximum length
returned. If it's not passed or zero, the value
will be returned in its full length
- reuse code for similar functionality implemented
in contribs/sddodbc/core.c by Mindaugas
- handle much more data types than it was implemented
in TODBC() class
may be [INCOMPATIBLE]
* contrib/hbodbc/todbc.prg
+ TODBC():LoadData() retrieve field content in native
type (was string, converted to Harbour type
on .prg level)
! TODBC():LoadData() fixed to not set decimal width
if it's zero
% minor optimizations and cleanups
* contrib/hbodbc/sql.ch
+ added new type constants
* contrib/hbodbc/tests/odbc.prg
+ display field information
+ display non-string fields too
* contrib/sddodbc/tests/test2.prg
! fixed to work as script
* contrib/sddodbc/core.c
* minor cleanups
! honor binary flag for strings when reading values
! map SQL_INTEGER to HB_FT_LONG (instead of HB_FT_INTEGER).
(SQL_INTEGER maps to SQL_C_LONG inside ODBC)
* contrib/hbodbc/tests/todbc.prg
% use FOR EACH
Itamar M. Lins Jr.