harbour/xharbour appear ADS functions error-SOLVED

harbour/xharbour appear ADS functions error-SOLVED

Postby richard-service » Tue Apr 02, 2024 8:51 am

Dear Antonio, EMG

I test Harbour 20240326 and xharbour 10281.
I test use ADS lib appear error below:
    Embarcadero C++ 7.70 for Win32 Copyright (c) 1993-2023 Embarcadero Technologies, Inc.
    Turbo Incremental Link 6.97 Copyright (c) 1997-2022 Embarcadero Technologies, Inc.
    Error: Unresolved external 'AdsSetServerType' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsGetDateFormat' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsSetDateFormat' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsGetEpoch' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsSetEpoch' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsApplicationExit' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsIsServerLoaded' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsUnlockRecord' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsGetMemoDataType' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsGetTableConnection' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsGetConnectionType' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsGetServerTime' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsIsTableLocked' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsIsRecordLocked' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    ...
Last edited by richard-service on Tue Apr 09, 2024 4:07 pm, edited 1 time in total.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan


Re: harbour/xharbour appear ADS functions error

Postby richard-service » Tue Apr 02, 2024 10:55 am

Enrico Maria Giordano wrote:Did you link ace32.lib and rddads.lib?


Yes, Linking

    RDDADS_LIB = $(HARBOUR_DIR)\Lib\rddads.lib
    ACE32_LIB = $(HARBOUR_DIR)\Lib\ace32.lib

    echo. s:\SetTool32\harbour\Lib\rddads.lib >> make.tmp
    echo. s:\SetTool32\harbour\Lib\ace32.lib >> make.tmp
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: harbour/xharbour appear ADS functions error

Postby Enrico Maria Giordano » Tue Apr 02, 2024 12:11 pm

Can you provide a little PRG sample to replicate the error here?
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: harbour/xharbour appear ADS functions error

Postby richard-service » Wed Apr 03, 2024 11:55 am

Enrico Maria Giordano wrote:Can you provide a little PRG sample to replicate the error here?


Dear EMG,
I download 20240401 version
I only test sample\TestAds.prg

Antonio,
Suggestion Harbour package include folder. need Ads.ch file.

    矬闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡醴
    ?FiveWin for Harbour 24.02 - Feb. 2024 Harbour development power 喝
    ?(c) FiveTech 1993-2024 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8/10 喊
    斂闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡闡囁?
    ? 葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔葔?
    Compiling...
    Harbour 3.2.0dev (r2403071241)
    Copyright (c) 1999-2021, https://harbour.github.io/
    Compiling 'testads.prg' and generating preprocessed output to 'testads.ppo'...
    Lines 5366, Functions/Procedures 1
    Generating C source output to 'testads.c'... Done.
    Embarcadero C++ 7.70 for Win32 Copyright (c) 1993-2023 Embarcadero Technologies, Inc.
    testads.c:
    Turbo Incremental Link 6.97 Copyright (c) 1997-2022 Embarcadero Technologies, Inc.
    Error: Unresolved external 'AdsSetServerType' referenced from S:\SETTOOL32\HARBOUR\LIB\WIN\BCC\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsGetDateFormat' referenced from S:\SETTOOL32\HARBOUR\LIB\WIN\BCC\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsSetDateFormat' referenced from S:\SETTOOL32\HARBOUR\LIB\WIN\BCC\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsGetEpoch' referenced from S:\SETTOOL32\HARBOUR\LIB\WIN\BCC\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsSetEpoch' referenced from S:\SETTOOL32\HARBOUR\LIB\WIN\BCC\RDDADS.LIB|adsfunc
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: harbour/xharbour appear ADS functions error

Postby Enrico Maria Giordano » Wed Apr 03, 2024 12:21 pm

Code: Select all  Expand view
testads.prg(2) Error F0029  Can't open #include file: 'ads.ch'


I can't find ads.ch.
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: harbour/xharbour appear ADS functions error

Postby richard-service » Wed Apr 03, 2024 12:23 pm

Enrico Maria Giordano wrote:
Code: Select all  Expand view
testads.prg(2) Error F0029  Can't open #include file: 'ads.ch'


I can't find ads.ch.


Yes, Harbour and xharbour package zip file. include folder need Ads.ch file.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: harbour/xharbour appear ADS functions error

Postby karinha » Wed Apr 03, 2024 12:24 pm

Hello, see if you have ADS.CH in the FWH\INCLUDE folder or in the HARBOUR\INCLUDE folder,

Code: Select all  Expand view

/*
 * $Id: ads.ch,v 1.12 2009/01/16 10:50:23 marchuet Exp $
 */


/*
 * Harbour Project source code:
 * Header file for Advantage Database Server RDD
 *
 * Copyright 2000 Alexander S.Kresin <alex@belacy.belgorod.su>
 * www - http://www.harbour-project.org
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this software; see the file COPYING.  If not, write to
 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
 *
 * As a special exception, the Harbour Project gives permission for
 * additional uses of the text contained in its release of Harbour.
 *
 * The exception is that, if you link the Harbour libraries with other
 * files to produce an executable, this does not by itself cause the
 * resulting executable to be covered by the GNU General Public License.
 * Your use of that executable is in no way restricted on account of
 * linking the Harbour library code into it.
 *
 * This exception does not however invalidate any other reasons why
 * the executable file might be covered by the GNU General Public License.
 *
 * This exception applies only to the code released by the Harbour
 * Project under the name Harbour.  If you copy code from other
 * Harbour Project or Free Software Foundation releases into a copy of
 * Harbour, as the General Public License permits, the exception does
 * not apply to the code that you add in this way.  To avoid misleading
 * anyone as to the status of such modified files, you must delete
 * this exception notice from them.
 *
 * If you write modifications of your own for Harbour, it is your choice
 * whether to permit this exception to apply to your modifications.
 * If you do not wish that, delete this exception notice.
 *
 */


/*
   If you want to limit your app to use an ADS version
   earlier than the current one, you must set this constant
      ADS_LIB_VERSION
   to the *latest* version you want to allow/require, as in
      -DADS_LIB_VERSION=500

   As of 6/7/2004, the default supports linking to v6 and v7,
   as there are no v7-specific features yet.
   It does cover v6 data dictionary support, built-in
   Internet Server capabilities, etc.

   So to link to v5, do this:
   1) Link with an ace32.lib created from the version 5
         dll that imports these functions, and

   2) Set this "define" when compiling rddads:
      -DADS_LIB_VERSION=500
*/


/* Supported file types */
#define ADS_NTX                           1
#define ADS_CDX                           2
#define ADS_ADT                           3
#define ADS_VFP                           4

/* Advantage Optimized Filter (AOF) optimization levels */
#define ADS_OPTIMIZED_FULL                1
#define ADS_OPTIMIZED_PART                2
#define ADS_OPTIMIZED_NONE                3

/* Advantage Optimized Filter (AOF) resolution options */
#define ADS_RESOLVE_IMMEDIATE             1
#define ADS_RESOLVE_DYNAMIC               2

/* Advantage Optimized Filter (AOF) customization options */
#define ADS_AOF_ADD_RECORD                1
#define ADS_AOF_REMOVE_RECORD             2
#define ADS_AOF_TOGGLE_RECORD             3

/* For retrieving scope settings
   In the Harbour RDD, use TOPSCOPE and BOTTOMSCOPE as the values are
   different (Top = 0, Bottom = 1)
   #define ADS_TOP                        1
   #define ADS_BOTTOM                     2
*/


/* for calls that can optionally use filters */
#define ADS_RESPECTFILTERS                1
#define ADS_IGNOREFILTERS                 2
#define ADS_RESPECTSCOPES                 3

/* Server type constants for ORing with AdsSetServerType() */
#define ADS_LOCAL_SERVER                  1
#define ADS_REMOTE_SERVER                 2
#define ADS_AIS_SERVER                    4

/* character set types */
#define ADS_ANSI                          1
#define ADS_OEM                           2

/*
 * Constants for AdsMgGetServerType()
 * Note ADS_MGMT_NETWARE_SERVER remains for backwards compatibility only.
 */

#define ADS_MGMT_NETWARE_SERVER           1
#define ADS_MGMT_NETWARE4_OR_OLDER_SERVER 1
#define ADS_MGMT_NT_SERVER                2
#define ADS_MGMT_LOCAL_SERVER             3
#define ADS_MGMT_WIN9X_SERVER             4
#define ADS_MGMT_NETWARE5_OR_NEWER_SERVER 5
#define ADS_MGMT_LINUX_SERVER             6

/* ACE Handle types */
#define ADS_CONNECTION                    1
#define ADS_TABLE                         2
#define ADS_INDEX_ORDER                   3
#define ADS_STATEMENT                     4
#define ADS_CURSOR                        5
#define ADS_DATABASE_CONNECTION           6
#define ADS_SYS_ADMIN_CONNECTION          7
#define ADS_FTS_INDEX_ORDER               8

#define AE_NO_CONNECTION                  5036

#define ADS_DD_TABLE_OBJECT               1
#define ADS_DD_RELATION_OBJECT            2
#define ADS_DD_INDEX_FILE_OBJECT          3
#define ADS_DD_FIELD_OBJECT               4
#define ADS_DD_COLUMN_OBJECT              4
#define ADS_DD_INDEX_OBJECT               5
#define ADS_DD_VIEW_OBJECT                6
#define ADS_DD_VIEW_OR_TABLE_OBJECT       7  /* Used in AdsFindFirst/NextTable */
#define ADS_DD_USER_OBJECT                8
#define ADS_DD_USER_GROUP_OBJECT          9
#define ADS_DD_PROCEDURE_OBJECT           10
#define ADS_DD_DATABASE_OBJECT            11
#define ADS_DD_LINK_OBJECT                12
#define ADS_DD_TABLE_VIEW_OR_LINK_OBJECT  13  /* Used in v6.2 AdsFindFirst/NextTable */

/* Common properties numbers < 100 */
#define ADS_DD_COMMENT                    1
#define ADS_DD_VERSION                    2
#define ADS_DD_USER_DEFINED_PROP          3

/* Database properties between 100 and 199 */
#define ADS_DD_DEFAULT_TABLE_PATH         100
#define ADS_DD_ADMIN_PASSWORD             101
#define ADS_DD_TEMP_TABLE_PATH            102
#define ADS_DD_LOG_IN_REQUIRED            103
#define ADS_DD_VERIFY_ACCESS_RIGHTS       104
#define ADS_DD_ENCRYPT_TABLE_PASSWORD     105
#define ADS_DD_ENCRYPT_NEW_TABLE          106
#define ADS_DD_ENABLE_INTERNET            107
#define ADS_DD_INTERNET_SECURITY_LEVEL    108
#define ADS_DD_MAX_FAILED_ATTEMPTS        109
#define ADS_DD_ALLOW_ADSSYS_NET_ACCESS    110
#define ADS_DD_VERSION_MAJOR              111  /* properties for customer dd version */
#define ADS_DD_VERSION_MINOR              112

/* Table properties between 200 and 299 */
#define ADS_DD_TABLE_VALIDATION_EXPR      200
#define ADS_DD_TABLE_VALIDATION_MSG       201
#define ADS_DD_TABLE_PRIMARY_KEY          202
#define ADS_DD_TABLE_AUTO_CREATE          203
#define ADS_DD_TABLE_TYPE                 204
#define ADS_DD_TABLE_PATH                 205
#define ADS_DD_TABLE_FIELD_COUNT          206
#define ADS_DD_TABLE_RI_GRAPH             207
#define ADS_DD_TABLE_OBJ_ID               208
#define ADS_DD_TABLE_RI_XY                209
#define ADS_DD_TABLE_IS_RI_PARENT         210
#define ADS_DD_TABLE_RELATIVE_PATH        211
#define ADS_DD_TABLE_CHAR_TYPE            212
#define ADS_DD_TABLE_DEFAULT_INDEX        213
#define ADS_DD_TABLE_ENCRYPTION           214
#define ADS_DD_TABLE_MEMO_BLOCK_SIZE      215
#define ADS_DD_TABLE_PERMISSION_LEVEL     216

/* Field properties between 300 - 399 */
#define ADS_DD_FIELD_DEFAULT_VALUE        300
#define ADS_DD_FIELD_CAN_NULL             301
#define ADS_DD_FIELD_MIN_VALUE            302
#define ADS_DD_FIELD_MAX_VALUE            303
#define ADS_DD_FIELD_VALIDATION_MSG       304
#define ADS_DD_FIELD_DEFINITION           305
#define ADS_DD_FIELD_TYPE                 306
#define ADS_DD_FIELD_LENGTH               307
#define ADS_DD_FIELD_DECIMAL              308

/* Index tag properties between 400 - 499 */
#define ADS_DD_INDEX_FILE_NAME            400
#define ADS_DD_INDEX_EXPRESSION           401
#define ADS_DD_INDEX_CONDITION            402
#define ADS_DD_INDEX_OPTIONS              403
#define ADS_DD_INDEX_KEY_LENGTH           404
#define ADS_DD_INDEX_KEY_TYPE             405

/* RI properties between 500-599 */
#define ADS_DD_RI_PARENT_GRAPH            500
#define ADS_DD_RI_PRIMARY_TABLE           501
#define ADS_DD_RI_PRIMARY_INDEX           502
#define ADS_DD_RI_FOREIGN_TABLE           503
#define ADS_DD_RI_FOREIGN_INDEX           504
#define ADS_DD_RI_UPDATERULE              505
#define ADS_DD_RI_DELETERULE              506
#define ADS_DD_RI_NO_PKEY_ERROR           507
#define ADS_DD_RI_CASCADE_ERROR           508

/* User properties between 600-699 */
#define ADS_DD_USER_GROUP_NAME            600

/* View properties between 700-749 */
#define ADS_DD_VIEW_STMT                  700
#define ADS_DD_VIEW_STMT_LEN              701

/* Stored procedure properties 800-899 */
#define ADS_DD_PROC_INPUT                 800
#define ADS_DD_PROC_OUTPUT                801
#define ADS_DD_PROC_DLL_NAME              802
#define ADS_DD_PROC_DLL_FUNCTION_NAME     803
#define ADS_DD_PROC_INVOKE_OPTION         804

/* Index file properties 900-999 */
#define ADS_DD_INDEX_FILE_PATH            900
#define ADS_DD_INDEX_FILE_PAGESIZE        901

/*
 * Object rights properties 1001 - 1099 .  They can be used
 * with either user or user group objects.
 */

#define ADS_DD_TABLES_RIGHTS              1001
#define ADS_DD_VIEWS_RIGHTS               1002
#define ADS_DD_PROCS_RIGHTS               1003
#define ADS_DD_OBJECTS_RIGHTS             1004
#define ADS_DD_FREE_TABLES_RIGHTS         1005

/* User Properties 1101 - 1199 */
#define ADS_DD_USER_PASSWORD              1101
#define ADS_DD_USER_GROUP_MEMBERSHIP      1102
#define ADS_DD_USER_BAD_LOGINS            1103

/* User group Properties 1201 - 1299 */
/* None at this moment. */

/* Link properties 1301 - 1399 */
#define ADS_DD_LINK_PATH                  1300
#define ADS_DD_LINK_OPTIONS               1301
#define ADS_DD_LINK_USERNAME              1302

#define ADS_DD_LEVEL_0                    0
#define ADS_DD_LEVEL_1                    1
#define ADS_DD_LEVEL_2                    2

/* Referential Integrity (RI) update and delete rules */
#define ADS_DD_RI_CASCADE                 1
#define ADS_DD_RI_RESTRICT                2
#define ADS_DD_RI_SETNULL                 3
#define ADS_DD_RI_SETDEFAULT              4

/* Default Field Value Options */
#define ADS_DD_DFV_UNKNOWN                1
#define ADS_DD_DFV_NONE                   2
#define ADS_DD_DFV_VALUES_STORED          3

/* Commands */

#command SET FILETYPE TO <x:NTX,CDX,ADT,VFP>                              ;
      => AdsSetFileType( iif( Upper( <(x)> ) == "NTX", ADS_NTX,           ;
                         iif( Upper( <(x)> ) == "CDX", ADS_CDX,           ;
                         iif( Upper( <(x)> ) == "VFP", ADS_VFP, ADS_ADT ) ) ) )

#command SET SERVER LOCAL   => AdsSetServerType( ADS_LOCAL_SERVER )
#command SET SERVER REMOTE  => AdsSetServerType( ADS_REMOTE_SERVER )

#command SET AXS LOCKING <x:ON,OFF>                                   ;
      => AdsLocking( Upper( <(x)> ) == "ON" )

#command SET RIGHTS CHECKING <x:ON,OFF>                               ;
      => AdsRightsCheck( Upper( <(x)> ) == "ON" )

#command SET CHARTYPE TO <x:ANSI,OEM>                                 ;
      => AdsSetCharType( iif( Upper( <(x)> ) == "OEM", ADS_OEM, ADS_ANSI ) )

#command COMMIT                 => AdsWriteAllRecords()
#command BEGIN TRANSACTION      => AdsBeginTransaction()
#command COMMIT TRANSACTION     => AdsCommitTransaction()
#command ROLLBACK TRANSACTION   => AdsRollback()

#command AUTOUSE <(db)> VIA <rdd> ALTERNATE <altrdd>                       ;
         [ALIAS <a>]                                                       ;
         [<new: NEW>]                                                      ;
         [<ex: EXCLUSIVE>]                                                 ;
         [<sh: SHARED>]                                                    ;
         [<ro: READONLY>]                                                  ;
         [INDEX <(index1)> [, <(indexn)>]]                                 ;
                                                                           ;
      => IF AdsIsServerLoaded( <(db)> ) > 0                                ;
       ;    dbUseArea(                                                     ;
                      <.new.>, <rdd>, <(db)>, <(a)>,                       ;
                      iif( <.sh.> .OR. <.ex.>, !<.ex.>, NIL ), <.ro.>      ;
                     )                                                     ;
            [; dbSetIndex( <(index1)> )]                                   ;
            [; dbSetIndex( <(indexn)> )]                                   ;
       ; ELSE                                                              ;
       ;    dbUseArea(                                                     ;
                      <.new.>, <altrdd>, <(db)>, <(a)>,                    ;
                      iif( <.sh.> .OR. <.ex.>, !<.ex.>, NIL ), <.ro.>      ;
                     )                                                     ;
            [; dbSetIndex( <(index1)> )]                                   ;
            [; dbSetIndex( <(indexn)> )]                                   ;
       ; ENDIF
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7824
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: harbour/xharbour appear ADS functions error

Postby richard-service » Wed Apr 03, 2024 12:24 pm

Enrico Maria Giordano wrote:
Code: Select all  Expand view
testads.prg(2) Error F0029  Can't open #include file: 'ads.ch'


I can't find ads.ch.


Ads.ch below:

Code: Select all  Expand view

/*
 * Header file for Advantage Database Server RDD
 *
 * Copyright 2000 Alexander S.Kresin <alex@belacy.belgorod.su>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; see the file LICENSE.txt.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301 USA (or visit https://www.gnu.org/licenses/).
 *
 * As a special exception, the Harbour Project gives permission for
 * additional uses of the text contained in its release of Harbour.
 *
 * The exception is that, if you link the Harbour libraries with other
 * files to produce an executable, this does not by itself cause the
 * resulting executable to be covered by the GNU General Public License.
 * Your use of that executable is in no way restricted on account of
 * linking the Harbour library code into it.
 *
 * This exception does not however invalidate any other reasons why
 * the executable file might be covered by the GNU General Public License.
 *
 * This exception applies only to the code released by the Harbour
 * Project under the name Harbour.  If you copy code from other
 * Harbour Project or Free Software Foundation releases into a copy of
 * Harbour, as the General Public License permits, the exception does
 * not apply to the code that you add in this way.  To avoid misleading
 * anyone as to the status of such modified files, you must delete
 * this exception notice from them.
 *
 * If you write modifications of your own for Harbour, it is your choice
 * whether to permit this exception to apply to your modifications.
 * If you do not wish that, delete this exception notice.
 *
 */


/*
   If you want to limit your app to use an ADS version
   earlier than the current one, you must set this constant
      ADS_LIB_VERSION
   to the *latest* version you want to allow/require, as in
      -DADS_LIB_VERSION=500

   As of 2004-06-07, the default supports linking to v6 and v7,
   as there are no v7-specific features yet.
   It does cover v6 data dictionary support, built-in
   Internet Server capabilities, etc.

   So to link to v5, do this:
   1) Link with an ace32.lib created from the version 5
         dll that imports these functions, and

   2) Set this "define" when compiling rddads:
      -DADS_LIB_VERSION=500
 */


#ifndef ADS_CH_
#define ADS_CH_

/* Supported file types */
#define ADS_NTX                           1
#define ADS_CDX                           2
#define ADS_ADT                           3
#define ADS_VFP                           4

/* Advantage Optimized Filter (AOF) optimization levels */
#define ADS_OPTIMIZED_FULL                1
#define ADS_OPTIMIZED_PART                2
#define ADS_OPTIMIZED_NONE                3

/* Advantage Optimized Filter (AOF) resolution options */
#define ADS_RESOLVE_IMMEDIATE             1
#define ADS_RESOLVE_DYNAMIC               2

/* Advantage Optimized Filter (AOF) customization options */
#define ADS_AOF_ADD_RECORD                1
#define ADS_AOF_REMOVE_RECORD             2
#define ADS_AOF_TOGGLE_RECORD             3

/* For retrieving scope settings
   In the Harbour RDD, use TOPSCOPE and BOTTOMSCOPE as the values are
   different (Top = 0, Bottom = 1) */

#if 0
   #define ADS_TOP                        1
   #define ADS_BOTTOM                     2
#endif

/* for calls that can optionally use filters */
#define ADS_RESPECTFILTERS                1
#define ADS_IGNOREFILTERS                 2
#define ADS_RESPECTSCOPES                 3
#define ADS_REFRESHCOUNT                  4

/* Server type constants for ORing with AdsSetServerType() */
#define ADS_LOCAL_SERVER                  1
#define ADS_REMOTE_SERVER                 2
#define ADS_AIS_SERVER                    4

/* character set types */
#define ADS_ANSI                          1
#define ADS_OEM                           2

/*
 * Constants for AdsMgGetServerType()
 * Note ADS_MGMT_NETWARE_SERVER remains for backwards compatibility only.
 */

#define ADS_MGMT_NETWARE_SERVER           1
#define ADS_MGMT_NETWARE4_OR_OLDER_SERVER 1
#define ADS_MGMT_NT_SERVER                2
#define ADS_MGMT_LOCAL_SERVER             3
#define ADS_MGMT_WIN9X_SERVER             4
#define ADS_MGMT_NETWARE5_OR_NEWER_SERVER 5
#define ADS_MGMT_LINUX_SERVER             6
#define ADS_MGMT_NT_SERVER_64_BIT         7
#define ADS_MGMT_LINUX_SERVER_64_BIT      8

/* ACE handle types */
#define ADS_CONNECTION                    1
#define ADS_TABLE                         2
#define ADS_INDEX_ORDER                   3
#define ADS_STATEMENT                     4
#define ADS_CURSOR                        5
#define ADS_DATABASE_CONNECTION           6
#define ADS_SYS_ADMIN_CONNECTION          7
#define ADS_FTS_INDEX_ORDER               8

#define AE_NO_CONNECTION                  5036

#define ADS_DD_TABLE_OBJECT               1
#define ADS_DD_RELATION_OBJECT            2
#define ADS_DD_INDEX_FILE_OBJECT          3
#define ADS_DD_FIELD_OBJECT               4
#define ADS_DD_COLUMN_OBJECT              4
#define ADS_DD_INDEX_OBJECT               5
#define ADS_DD_VIEW_OBJECT                6
#define ADS_DD_VIEW_OR_TABLE_OBJECT       7  /* Used in AdsFindFirstTable()/AdsFindNextTable() */
#define ADS_DD_USER_OBJECT                8
#define ADS_DD_USER_GROUP_OBJECT          9
#define ADS_DD_PROCEDURE_OBJECT           10
#define ADS_DD_DATABASE_OBJECT            11
#define ADS_DD_LINK_OBJECT                12
#define ADS_DD_TABLE_VIEW_OR_LINK_OBJECT  13  /* Used in 6.2 AdsFindFirstTable()/AdsFindNextTable() */

/* Common properties numbers < 100 */
#define ADS_DD_COMMENT                    1
#define ADS_DD_VERSION                    2
#define ADS_DD_USER_DEFINED_PROP          3

/* Database properties between 100 and 199 */
#define ADS_DD_DEFAULT_TABLE_PATH         100
#define ADS_DD_ADMIN_PASSWORD             101
#define ADS_DD_TEMP_TABLE_PATH            102
#define ADS_DD_LOG_IN_REQUIRED            103
#define ADS_DD_VERIFY_ACCESS_RIGHTS       104
#define ADS_DD_ENCRYPT_TABLE_PASSWORD     105
#define ADS_DD_ENCRYPT_NEW_TABLE          106
#define ADS_DD_ENABLE_INTERNET            107
#define ADS_DD_INTERNET_SECURITY_LEVEL    108
#define ADS_DD_MAX_FAILED_ATTEMPTS        109
#define ADS_DD_ALLOW_ADSSYS_NET_ACCESS    110
#define ADS_DD_VERSION_MAJOR              111  /* properties for customer DD version */
#define ADS_DD_VERSION_MINOR              112

/* Table properties between 200 and 299 */
#define ADS_DD_TABLE_VALIDATION_EXPR      200
#define ADS_DD_TABLE_VALIDATION_MSG       201
#define ADS_DD_TABLE_PRIMARY_KEY          202
#define ADS_DD_TABLE_AUTO_CREATE          203
#define ADS_DD_TABLE_TYPE                 204
#define ADS_DD_TABLE_PATH                 205
#define ADS_DD_TABLE_FIELD_COUNT          206
#define ADS_DD_TABLE_RI_GRAPH             207
#define ADS_DD_TABLE_OBJ_ID               208
#define ADS_DD_TABLE_RI_XY                209
#define ADS_DD_TABLE_IS_RI_PARENT         210
#define ADS_DD_TABLE_RELATIVE_PATH        211
#define ADS_DD_TABLE_CHAR_TYPE            212
#define ADS_DD_TABLE_DEFAULT_INDEX        213
#define ADS_DD_TABLE_ENCRYPTION           214
#define ADS_DD_TABLE_MEMO_BLOCK_SIZE      215
#define ADS_DD_TABLE_PERMISSION_LEVEL     216

/* Field properties between 300-399 */
#define ADS_DD_FIELD_DEFAULT_VALUE        300
#define ADS_DD_FIELD_CAN_NULL             301
#define ADS_DD_FIELD_MIN_VALUE            302
#define ADS_DD_FIELD_MAX_VALUE            303
#define ADS_DD_FIELD_VALIDATION_MSG       304
#define ADS_DD_FIELD_DEFINITION           305
#define ADS_DD_FIELD_TYPE                 306
#define ADS_DD_FIELD_LENGTH               307
#define ADS_DD_FIELD_DECIMAL              308

/* Index tag properties between 400-499 */
#define ADS_DD_INDEX_FILE_NAME            400
#define ADS_DD_INDEX_EXPRESSION           401
#define ADS_DD_INDEX_CONDITION            402
#define ADS_DD_INDEX_OPTIONS              403
#define ADS_DD_INDEX_KEY_LENGTH           404
#define ADS_DD_INDEX_KEY_TYPE             405

/* RI properties between 500-599 */
#define ADS_DD_RI_PARENT_GRAPH            500
#define ADS_DD_RI_PRIMARY_TABLE           501
#define ADS_DD_RI_PRIMARY_INDEX           502
#define ADS_DD_RI_FOREIGN_TABLE           503
#define ADS_DD_RI_FOREIGN_INDEX           504
#define ADS_DD_RI_UPDATERULE              505
#define ADS_DD_RI_DELETERULE              506
#define ADS_DD_RI_NO_PKEY_ERROR           507
#define ADS_DD_RI_CASCADE_ERROR           508

/* User properties between 600-699 */
#define ADS_DD_USER_GROUP_NAME            600

/* View properties between 700-749 */
#define ADS_DD_VIEW_STMT                  700
#define ADS_DD_VIEW_STMT_LEN              701

/* Stored procedure properties 800-899 */
#define ADS_DD_PROC_INPUT                 800
#define ADS_DD_PROC_OUTPUT                801
#define ADS_DD_PROC_DLL_NAME              802
#define ADS_DD_PROC_DLL_FUNCTION_NAME     803
#define ADS_DD_PROC_INVOKE_OPTION         804

/* Index file properties 900-999 */
#define ADS_DD_INDEX_FILE_PATH            900
#define ADS_DD_INDEX_FILE_PAGESIZE        901

/*
 * Object rights properties 1001-1099. They can be used
 * with either user or user group objects.
 */

#define ADS_DD_TABLES_RIGHTS              1001
#define ADS_DD_VIEWS_RIGHTS               1002
#define ADS_DD_PROCS_RIGHTS               1003
#define ADS_DD_OBJECTS_RIGHTS             1004
#define ADS_DD_FREE_TABLES_RIGHTS         1005

/* User Properties 1101-1199 */
#define ADS_DD_USER_PASSWORD              1101
#define ADS_DD_USER_GROUP_MEMBERSHIP      1102
#define ADS_DD_USER_BAD_LOGINS            1103

/* User group Properties 1201-1299 */
/* None at this moment. */

/* Link properties 1301-1399 */
#define ADS_DD_LINK_PATH                  1300
#define ADS_DD_LINK_OPTIONS               1301
#define ADS_DD_LINK_USERNAME              1302

#define ADS_DD_LEVEL_0                    0
#define ADS_DD_LEVEL_1                    1
#define ADS_DD_LEVEL_2                    2

/* Referential Integrity (RI) update and delete rules */
#define ADS_DD_RI_CASCADE                 1
#define ADS_DD_RI_RESTRICT                2
#define ADS_DD_RI_SETNULL                 3
#define ADS_DD_RI_SETDEFAULT              4

/* Default Field Value Options */
#define ADS_DD_DFV_UNKNOWN                1
#define ADS_DD_DFV_NONE                   2
#define ADS_DD_DFV_VALUES_STORED          3

/* Commands */

#command SET FILETYPE TO <x:NTX,CDX,ADT,VFP>                              ;
      => AdsSetFileType( iif( Upper( <(x)> ) == "NTX", ADS_NTX,           ;
                         iif( Upper( <(x)> ) == "CDX", ADS_CDX,           ;
                         iif( Upper( <(x)> ) == "VFP", ADS_VFP, ADS_ADT ) ) ) )

#command SET SERVER LOCAL   => AdsSetServerType( ADS_LOCAL_SERVER )
#command SET SERVER REMOTE  => AdsSetServerType( ADS_REMOTE_SERVER )

#command SET AXS LOCKING <x:ON,OFF>                                   ;
      => AdsLocking( Upper( <(x)> ) == "ON" )

#command SET RIGHTS CHECKING <x:ON,OFF>                               ;
      => AdsRightsCheck( Upper( <(x)> ) == "ON" )

#command SET CHARTYPE TO <x:ANSI,OEM>                                 ;
      => AdsSetCharType( iif( Upper( <(x)> ) == "OEM", ADS_OEM, ADS_ANSI ) )

#command BEGIN TRANSACTION      => AdsBeginTransaction()
#command COMMIT TRANSACTION     => AdsCommitTransaction()
#command ROLLBACK TRANSACTION   => AdsRollback()

#command AUTOUSE <(db)> VIA <rdd> ALTERNATE <altrdd>                       ;
         [ALIAS <a>]                                                       ;
         [<new: NEW>]                                                      ;
         [<ex: EXCLUSIVE>]                                                 ;
         [<sh: SHARED>]                                                    ;
         [<ro: READONLY>]                                                  ;
         [INDEX <(index1)> [, <(indexn)>]]                                 ;
                                                                           ;
      => IF AdsIsServerLoaded( <(db)> ) > 0                                ;
       ;    dbUseArea(                                                     ;
                      <.new.>, <rdd>, <(db)>, <(a)>,                       ;
                      iif( <.sh.> .OR. <.ex.>, ! <.ex.>, NIL ), <.ro.>     ;
                     )                                                     ;
            [; dbSetIndex( <(index1)> )]                                   ;
            [; dbSetIndex( <(indexn)> )]                                   ;
       ; ELSE                                                              ;
       ;    dbUseArea(                                                     ;
                      <.new.>, <altrdd>, <(db)>, <(a)>,                    ;
                      iif( <.sh.> .OR. <.ex.>, ! <.ex.>, NIL ), <.ro.>     ;
                     )                                                     ;
            [; dbSetIndex( <(index1)> )]                                   ;
            [; dbSetIndex( <(indexn)> )]                                   ;
       ; END

#endif
 
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: harbour/xharbour appear ADS functions error

Postby richard-service » Wed Apr 03, 2024 12:27 pm

karinha wrote:Hello, see if you have ADS.CH in the FWH\INCLUDE folder or in the HARBOUR\INCLUDE folder,

Code: Select all  Expand view

/*
 * $Id: ads.ch,v 1.12 2009/01/16 10:50:23 marchuet Exp $
 */


/*
 * Harbour Project source code:
 * Header file for Advantage Database Server RDD
 *
 * Copyright 2000 Alexander S.Kresin <alex@belacy.belgorod.su>
 * www - http://www.harbour-project.org
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this software; see the file COPYING.  If not, write to
 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
 *
 * As a special exception, the Harbour Project gives permission for
 * additional uses of the text contained in its release of Harbour.
 *
 * The exception is that, if you link the Harbour libraries with other
 * files to produce an executable, this does not by itself cause the
 * resulting executable to be covered by the GNU General Public License.
 * Your use of that executable is in no way restricted on account of
 * linking the Harbour library code into it.
 *
 * This exception does not however invalidate any other reasons why
 * the executable file might be covered by the GNU General Public License.
 *
 * This exception applies only to the code released by the Harbour
 * Project under the name Harbour.  If you copy code from other
 * Harbour Project or Free Software Foundation releases into a copy of
 * Harbour, as the General Public License permits, the exception does
 * not apply to the code that you add in this way.  To avoid misleading
 * anyone as to the status of such modified files, you must delete
 * this exception notice from them.
 *
 * If you write modifications of your own for Harbour, it is your choice
 * whether to permit this exception to apply to your modifications.
 * If you do not wish that, delete this exception notice.
 *
 */


/*
   If you want to limit your app to use an ADS version
   earlier than the current one, you must set this constant
      ADS_LIB_VERSION
   to the *latest* version you want to allow/require, as in
      -DADS_LIB_VERSION=500

   As of 6/7/2004, the default supports linking to v6 and v7,
   as there are no v7-specific features yet.
   It does cover v6 data dictionary support, built-in
   Internet Server capabilities, etc.

   So to link to v5, do this:
   1) Link with an ace32.lib created from the version 5
         dll that imports these functions, and

   2) Set this "define" when compiling rddads:
      -DADS_LIB_VERSION=500
*/


/* Supported file types */
#define ADS_NTX                           1
#define ADS_CDX                           2
#define ADS_ADT                           3
#define ADS_VFP                           4

/* Advantage Optimized Filter (AOF) optimization levels */
#define ADS_OPTIMIZED_FULL                1
#define ADS_OPTIMIZED_PART                2
#define ADS_OPTIMIZED_NONE                3

/* Advantage Optimized Filter (AOF) resolution options */
#define ADS_RESOLVE_IMMEDIATE             1
#define ADS_RESOLVE_DYNAMIC               2

/* Advantage Optimized Filter (AOF) customization options */
#define ADS_AOF_ADD_RECORD                1
#define ADS_AOF_REMOVE_RECORD             2
#define ADS_AOF_TOGGLE_RECORD             3

/* For retrieving scope settings
   In the Harbour RDD, use TOPSCOPE and BOTTOMSCOPE as the values are
   different (Top = 0, Bottom = 1)
   #define ADS_TOP                        1
   #define ADS_BOTTOM                     2
*/


/* for calls that can optionally use filters */
#define ADS_RESPECTFILTERS                1
#define ADS_IGNOREFILTERS                 2
#define ADS_RESPECTSCOPES                 3

/* Server type constants for ORing with AdsSetServerType() */
#define ADS_LOCAL_SERVER                  1
#define ADS_REMOTE_SERVER                 2
#define ADS_AIS_SERVER                    4

/* character set types */
#define ADS_ANSI                          1
#define ADS_OEM                           2

/*
 * Constants for AdsMgGetServerType()
 * Note ADS_MGMT_NETWARE_SERVER remains for backwards compatibility only.
 */

#define ADS_MGMT_NETWARE_SERVER           1
#define ADS_MGMT_NETWARE4_OR_OLDER_SERVER 1
#define ADS_MGMT_NT_SERVER                2
#define ADS_MGMT_LOCAL_SERVER             3
#define ADS_MGMT_WIN9X_SERVER             4
#define ADS_MGMT_NETWARE5_OR_NEWER_SERVER 5
#define ADS_MGMT_LINUX_SERVER             6

/* ACE Handle types */
#define ADS_CONNECTION                    1
#define ADS_TABLE                         2
#define ADS_INDEX_ORDER                   3
#define ADS_STATEMENT                     4
#define ADS_CURSOR                        5
#define ADS_DATABASE_CONNECTION           6
#define ADS_SYS_ADMIN_CONNECTION          7
#define ADS_FTS_INDEX_ORDER               8

#define AE_NO_CONNECTION                  5036

#define ADS_DD_TABLE_OBJECT               1
#define ADS_DD_RELATION_OBJECT            2
#define ADS_DD_INDEX_FILE_OBJECT          3
#define ADS_DD_FIELD_OBJECT               4
#define ADS_DD_COLUMN_OBJECT              4
#define ADS_DD_INDEX_OBJECT               5
#define ADS_DD_VIEW_OBJECT                6
#define ADS_DD_VIEW_OR_TABLE_OBJECT       7  /* Used in AdsFindFirst/NextTable */
#define ADS_DD_USER_OBJECT                8
#define ADS_DD_USER_GROUP_OBJECT          9
#define ADS_DD_PROCEDURE_OBJECT           10
#define ADS_DD_DATABASE_OBJECT            11
#define ADS_DD_LINK_OBJECT                12
#define ADS_DD_TABLE_VIEW_OR_LINK_OBJECT  13  /* Used in v6.2 AdsFindFirst/NextTable */

/* Common properties numbers < 100 */
#define ADS_DD_COMMENT                    1
#define ADS_DD_VERSION                    2
#define ADS_DD_USER_DEFINED_PROP          3

/* Database properties between 100 and 199 */
#define ADS_DD_DEFAULT_TABLE_PATH         100
#define ADS_DD_ADMIN_PASSWORD             101
#define ADS_DD_TEMP_TABLE_PATH            102
#define ADS_DD_LOG_IN_REQUIRED            103
#define ADS_DD_VERIFY_ACCESS_RIGHTS       104
#define ADS_DD_ENCRYPT_TABLE_PASSWORD     105
#define ADS_DD_ENCRYPT_NEW_TABLE          106
#define ADS_DD_ENABLE_INTERNET            107
#define ADS_DD_INTERNET_SECURITY_LEVEL    108
#define ADS_DD_MAX_FAILED_ATTEMPTS        109
#define ADS_DD_ALLOW_ADSSYS_NET_ACCESS    110
#define ADS_DD_VERSION_MAJOR              111  /* properties for customer dd version */
#define ADS_DD_VERSION_MINOR              112

/* Table properties between 200 and 299 */
#define ADS_DD_TABLE_VALIDATION_EXPR      200
#define ADS_DD_TABLE_VALIDATION_MSG       201
#define ADS_DD_TABLE_PRIMARY_KEY          202
#define ADS_DD_TABLE_AUTO_CREATE          203
#define ADS_DD_TABLE_TYPE                 204
#define ADS_DD_TABLE_PATH                 205
#define ADS_DD_TABLE_FIELD_COUNT          206
#define ADS_DD_TABLE_RI_GRAPH             207
#define ADS_DD_TABLE_OBJ_ID               208
#define ADS_DD_TABLE_RI_XY                209
#define ADS_DD_TABLE_IS_RI_PARENT         210
#define ADS_DD_TABLE_RELATIVE_PATH        211
#define ADS_DD_TABLE_CHAR_TYPE            212
#define ADS_DD_TABLE_DEFAULT_INDEX        213
#define ADS_DD_TABLE_ENCRYPTION           214
#define ADS_DD_TABLE_MEMO_BLOCK_SIZE      215
#define ADS_DD_TABLE_PERMISSION_LEVEL     216

/* Field properties between 300 - 399 */
#define ADS_DD_FIELD_DEFAULT_VALUE        300
#define ADS_DD_FIELD_CAN_NULL             301
#define ADS_DD_FIELD_MIN_VALUE            302
#define ADS_DD_FIELD_MAX_VALUE            303
#define ADS_DD_FIELD_VALIDATION_MSG       304
#define ADS_DD_FIELD_DEFINITION           305
#define ADS_DD_FIELD_TYPE                 306
#define ADS_DD_FIELD_LENGTH               307
#define ADS_DD_FIELD_DECIMAL              308

/* Index tag properties between 400 - 499 */
#define ADS_DD_INDEX_FILE_NAME            400
#define ADS_DD_INDEX_EXPRESSION           401
#define ADS_DD_INDEX_CONDITION            402
#define ADS_DD_INDEX_OPTIONS              403
#define ADS_DD_INDEX_KEY_LENGTH           404
#define ADS_DD_INDEX_KEY_TYPE             405

/* RI properties between 500-599 */
#define ADS_DD_RI_PARENT_GRAPH            500
#define ADS_DD_RI_PRIMARY_TABLE           501
#define ADS_DD_RI_PRIMARY_INDEX           502
#define ADS_DD_RI_FOREIGN_TABLE           503
#define ADS_DD_RI_FOREIGN_INDEX           504
#define ADS_DD_RI_UPDATERULE              505
#define ADS_DD_RI_DELETERULE              506
#define ADS_DD_RI_NO_PKEY_ERROR           507
#define ADS_DD_RI_CASCADE_ERROR           508

/* User properties between 600-699 */
#define ADS_DD_USER_GROUP_NAME            600

/* View properties between 700-749 */
#define ADS_DD_VIEW_STMT                  700
#define ADS_DD_VIEW_STMT_LEN              701

/* Stored procedure properties 800-899 */
#define ADS_DD_PROC_INPUT                 800
#define ADS_DD_PROC_OUTPUT                801
#define ADS_DD_PROC_DLL_NAME              802
#define ADS_DD_PROC_DLL_FUNCTION_NAME     803
#define ADS_DD_PROC_INVOKE_OPTION         804

/* Index file properties 900-999 */
#define ADS_DD_INDEX_FILE_PATH            900
#define ADS_DD_INDEX_FILE_PAGESIZE        901

/*
 * Object rights properties 1001 - 1099 .  They can be used
 * with either user or user group objects.
 */

#define ADS_DD_TABLES_RIGHTS              1001
#define ADS_DD_VIEWS_RIGHTS               1002
#define ADS_DD_PROCS_RIGHTS               1003
#define ADS_DD_OBJECTS_RIGHTS             1004
#define ADS_DD_FREE_TABLES_RIGHTS         1005

/* User Properties 1101 - 1199 */
#define ADS_DD_USER_PASSWORD              1101
#define ADS_DD_USER_GROUP_MEMBERSHIP      1102
#define ADS_DD_USER_BAD_LOGINS            1103

/* User group Properties 1201 - 1299 */
/* None at this moment. */

/* Link properties 1301 - 1399 */
#define ADS_DD_LINK_PATH                  1300
#define ADS_DD_LINK_OPTIONS               1301
#define ADS_DD_LINK_USERNAME              1302

#define ADS_DD_LEVEL_0                    0
#define ADS_DD_LEVEL_1                    1
#define ADS_DD_LEVEL_2                    2

/* Referential Integrity (RI) update and delete rules */
#define ADS_DD_RI_CASCADE                 1
#define ADS_DD_RI_RESTRICT                2
#define ADS_DD_RI_SETNULL                 3
#define ADS_DD_RI_SETDEFAULT              4

/* Default Field Value Options */
#define ADS_DD_DFV_UNKNOWN                1
#define ADS_DD_DFV_NONE                   2
#define ADS_DD_DFV_VALUES_STORED          3

/* Commands */

#command SET FILETYPE TO <x:NTX,CDX,ADT,VFP>                              ;
      => AdsSetFileType( iif( Upper( <(x)> ) == "NTX", ADS_NTX,           ;
                         iif( Upper( <(x)> ) == "CDX", ADS_CDX,           ;
                         iif( Upper( <(x)> ) == "VFP", ADS_VFP, ADS_ADT ) ) ) )

#command SET SERVER LOCAL   => AdsSetServerType( ADS_LOCAL_SERVER )
#command SET SERVER REMOTE  => AdsSetServerType( ADS_REMOTE_SERVER )

#command SET AXS LOCKING <x:ON,OFF>                                   ;
      => AdsLocking( Upper( <(x)> ) == "ON" )

#command SET RIGHTS CHECKING <x:ON,OFF>                               ;
      => AdsRightsCheck( Upper( <(x)> ) == "ON" )

#command SET CHARTYPE TO <x:ANSI,OEM>                                 ;
      => AdsSetCharType( iif( Upper( <(x)> ) == "OEM", ADS_OEM, ADS_ANSI ) )

#command COMMIT                 => AdsWriteAllRecords()
#command BEGIN TRANSACTION      => AdsBeginTransaction()
#command COMMIT TRANSACTION     => AdsCommitTransaction()
#command ROLLBACK TRANSACTION   => AdsRollback()

#command AUTOUSE <(db)> VIA <rdd> ALTERNATE <altrdd>                       ;
         [ALIAS <a>]                                                       ;
         [<new: NEW>]                                                      ;
         [<ex: EXCLUSIVE>]                                                 ;
         [<sh: SHARED>]                                                    ;
         [<ro: READONLY>]                                                  ;
         [INDEX <(index1)> [, <(indexn)>]]                                 ;
                                                                           ;
      => IF AdsIsServerLoaded( <(db)> ) > 0                                ;
       ;    dbUseArea(                                                     ;
                      <.new.>, <rdd>, <(db)>, <(a)>,                       ;
                      iif( <.sh.> .OR. <.ex.>, !<.ex.>, NIL ), <.ro.>      ;
                     )                                                     ;
            [; dbSetIndex( <(index1)> )]                                   ;
            [; dbSetIndex( <(indexn)> )]                                   ;
       ; ELSE                                                              ;
       ;    dbUseArea(                                                     ;
                      <.new.>, <altrdd>, <(db)>, <(a)>,                    ;
                      iif( <.sh.> .OR. <.ex.>, !<.ex.>, NIL ), <.ro.>      ;
                     )                                                     ;
            [; dbSetIndex( <(index1)> )]                                   ;
            [; dbSetIndex( <(indexn)> )]                                   ;
       ; ENDIF
 


Regards, Saludos.


Dear karinha,
Could you please try to build Sample\TestAds.prg ?
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: harbour/xharbour appear ADS functions error

Postby Enrico Maria Giordano » Wed Apr 03, 2024 12:29 pm

richard-service wrote:
Enrico Maria Giordano wrote:
Code: Select all  Expand view
testads.prg(2) Error F0029  Can't open #include file: 'ads.ch'


I can't find ads.ch.


Yes, Harbour and xharbour package zip file. include folder need Ads.ch file.


You are right! I'm going to prepare new builds for Harbour and xHarbour containing ads.ch. Any other ADS files missing?
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: harbour/xharbour appear ADS functions error

Postby Enrico Maria Giordano » Wed Apr 03, 2024 12:34 pm

With ads.ch and linking rddads.lib I have no unresolved externals. Can I see the batch are you using to compile?
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: harbour/xharbour appear ADS functions error

Postby Enrico Maria Giordano » Wed Apr 03, 2024 12:38 pm

richard-service wrote:Dear Antonio, EMG

I test Harbour 20240326 and xharbour 10281.
I test use ADS lib appear error below:
    Embarcadero C++ 7.70 for Win32 Copyright (c) 1993-2023 Embarcadero Technologies, Inc.
    Turbo Incremental Link 6.97 Copyright (c) 1997-2022 Embarcadero Technologies, Inc.
    Error: Unresolved external 'AdsSetServerType' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsGetDateFormat' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsSetDateFormat' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsGetEpoch' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsSetEpoch' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsApplicationExit' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsIsServerLoaded' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsUnlockRecord' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsGetMemoDataType' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsGetTableConnection' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsGetConnectionType' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsGetServerTime' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsIsTableLocked' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    Error: Unresolved external 'AdsIsRecordLocked' referenced from S:\SETTOOL32\HARBOUR\LIB\RDDADS.LIB|adsfunc
    ...


Please check if the above symbol are in the rddads.lib you are using. It looks like you are not using the correct build as Harbour has its libs in a sub-sub folder, not directly in the lib folder.
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: harbour/xharbour appear ADS functions error

Postby richard-service » Wed Apr 03, 2024 12:39 pm

Enrico Maria Giordano wrote:With ads.ch and linking rddads.lib I have no unresolved externals. Can I see the batch are you using to compile?


I use FWH\samples\Buildx.bat and Buildh.bat
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: harbour/xharbour appear ADS functions error

Postby Antonio Linares » Wed Apr 03, 2024 12:43 pm

Dear Richard,

We have read about the earthquake on Taiwan, are you ok ?

Wishing you and all your loved ones, and everyone, is ok
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Natter and 54 guests