FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to use Advantage Database?
Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
How to use Advantage Database?
Posted: Tue Feb 24, 2015 11:59 AM
I want to use the normal DBF functions, but I need a Character field bigger than 255 characters.

I found this site that reference Advantage Database character length as:

Type: Character Length: 1 to 65534 Decimals: N/A Description: Fixed-length character field that is stored entirely in the table. Note that if you want the table to be compatible with Visual FoxPro, you should limit the field length to 254 or less.

Anyone can help me?
Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: How to use Advantage Database?
Posted: Tue Feb 24, 2015 12:55 PM
Sambomb,

Se vc vai usar os arquivo no formato DBF, usa exatamente igual sem o ADS.
Code (fw): Select all Collapse
#include "fivewin.ch"
#include "ads.ch"

function main()

   RddRegister( "ADS", 1 )
   AdsSetServerType( ADS_LOCAL_SERVER )
   RDDSetDefault( "CDX" )
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Re: How to use Advantage Database?
Posted: Tue Feb 24, 2015 01:35 PM
Atualmente uso assim:

Code (fw): Select all Collapse
#include 'fivewin.ch'

//-- DBFCDX --------------------------------------------------------------//

ANNOUNCE RDDSYS
REQUEST OrdKeyNo, OrdKeyCount, OrdKeyGoto
REQUEST DBFCDX, DBFFPT

REQUEST HB_Lang_PT

****************************************************************************
function Principal()
****************************************************************************

local cWallPaper := '', oBgBmp := nil, nWidth := nHeight := 0,;
      cTitle := "", cDirectoryExe := ''

public oWnd, aDlgs := {}

   RDDSETDEFAULT( "DBFCDX" )

   HB_LANGSELECT( 'PT' )
   HB_SETCODEPAGE( "PT850" )
Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: How to use Advantage Database?
Posted: Tue Feb 24, 2015 01:42 PM
Acho que assim deve funcionar pra vc. Tem que ter na pasta do sistemas as DLL do ADS (ADSLOC32.DLL e ACE32.DLL). O resto funciona tudo igual.
Code (fw): Select all Collapse
#include 'fivewin.ch'
#include 'ads.ch'

REQUEST OrdKeyNo, OrdKeyCount, OrdKeyGoto

REQUEST HB_Lang_PT

****************************************************************************
function Principal()
****************************************************************************

local cWallPaper := '', oBgBmp := nil, nWidth := nHeight := 0,;
      cTitle := "", cDirectoryExe := ''

public oWnd, aDlgs := {}

   RddRegister( "ADS", 1 )
   AdsSetServerType( ADS_LOCAL_SERVER )
   RDDSetDefault( "CDX" )

   HB_LANGSELECT( 'PT' )
   HB_SETCODEPAGE( "PT850" )
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Re: How to use Advantage Database?
Posted: Tue Feb 24, 2015 02:27 PM

Vou fazer um teste depois e dou o retorno

Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Re: How to use Advantage Database?
Posted: Thu May 07, 2015 06:56 PM

Fiz funcionar aqui, obrigado!

Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2

Continue the discussion