Skip to content

Commit

Permalink
Merge pull request #367 from EricLendvai/rddsql_add_timestamp_support
Browse files Browse the repository at this point in the history
On branch rddsql_add_timestamp_support
  • Loading branch information
FiveTechSoft authored Dec 19, 2024
2 parents 79c4f25 + 076589f commit 1e0c5c6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
Entries may not always be in chronological/commit order.
See license at the end of file. */

2024-12-18 21:48 UTC-0800 Eric Lendvai (harbour.wiki)
* contrib/rddsql/sqlbase.c
* contrib/rddsql/sqlmix.c
+ added support to timestamp field type.
You can now use "@" in DbCreate as the timestamp field type.
Thanks to Grigory Filatov for fixing crash!

2024-12-17 03:07 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/gtqtc/gtqtc.hbc
! fixed dependency macros - hbmk2 defines HB_HAS_* only for optional packages
Expand Down
7 changes: 7 additions & 0 deletions contrib/rddsql/sqlbase.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ static HB_ERRCODE sqlbasePutValue( SQLBASEAREAP pArea, HB_USHORT uiIndex, PHB_IT
errCode = HB_SUCCESS;
pField = pArea->area.lpFields + ( uiIndex - 1 );


if( ( ( HB_IS_MEMO( pItem ) || HB_IS_STRING( pItem ) ) && ( pField->uiType == HB_FT_STRING || pField->uiType == HB_FT_MEMO ) ) ||
( HB_IS_DATE( pItem ) && pField->uiType == HB_FT_DATE ) ||
( HB_IS_TIMESTAMP( pItem ) && pField->uiType == HB_FT_TIMESTAMP ) ||
Expand Down Expand Up @@ -742,6 +743,12 @@ static HB_ERRCODE sqlbaseCreate( SQLBASEAREAP pArea, LPDBOPENINFO pOpenInfo )
pItem = hb_itemPutDS( NULL, NULL );
break;

case HB_FT_TIMESTAMP:
{
pItem = hb_itemPutTDT( NULL, 0, 0 );
break;
}

case HB_FT_LOGICAL:
pItem = hb_itemPutL( NULL, HB_FALSE );
break;
Expand Down
5 changes: 5 additions & 0 deletions contrib/rddsql/sqlmix.c
Original file line number Diff line number Diff line change
Expand Up @@ -1597,6 +1597,11 @@ static HB_ERRCODE sqlmixOrderCreate( SQLMIXAREAP pArea, LPDBORDERCREATEINFO pOrd
uiLen = 8;
break;

case HB_IT_TIMESTAMP:
bType = '@';
uiLen = 26;
break;

case HB_IT_LOGICAL:
bType = 'L';
uiLen = 1;
Expand Down

0 comments on commit 1e0c5c6

Please sign in to comment.