FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ADS and time fields [done]
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM
ADS and time fields [done]
Posted: Fri Nov 07, 2014 12:40 PM

Hello,

I would like to know it latest ADS versi贸n, I guess it麓s 11, supports Time "T" fields.

Also, what advantages has versi贸n 11 over versi贸n 10?.

Thank you.

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM
Re: ADS and time fields
Posted: Fri Nov 14, 2014 09:40 PM

Any clue?.

Thanks.

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: ADS and time fields
Posted: Sat Nov 15, 2014 02:32 AM

Moises,

ADS support 'TimeStamp' fieldtype.

I'm only using v10

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM
Re: ADS and time fields
Posted: Fri Nov 21, 2014 10:07 AM

Hello,

I am afraid this sample does not work, it does not cr茅ate the dbf:

include "ads.ch"

REQUEST HB_Lang_ES
REQUEST HB_CODEPAGE_ESWIN

//-------------------------------------------------------------------------------------------------------------
FUNCTION MAIN()
//-------------------------------------------------------------------------------------------------------------

LOCAL aStruct, cFichero, nRet := 0

// Idioma espa帽ol para Harbour
HB_LangSelect("ES") // Para mensajes, fechas, etc..
HB_CDPSELECT("ESWIN") // Para ordenaci贸n, requiere CodePage.lib

REQUEST DBFCDX, DBFFPT

Request ADS,ADSKeyCount,ADSKeyNo,OrdKeyCount,OrdKeyNo, AdsGetRelKeyPos, AdsSetRelKeyPos

RddRegister( "ADS", 1 )
RddSetDefault( "ADS" )

 adsSetServerType( 1 )  // 贸   ADS_LOCAL_SERVER


 //setting up the file types
 adsSetFileType( ADS_CDX )


 // resto de sets
 AdsRightsCheck( .F. )
 SET DELETED ON





 aStruct  := { { "NAME",       "C", 15, 0 },;
               { "DATE",       "D", 08, 0 },;
               { "TIME",       "T", 08, 0 },;
               { "TEXTO",      "C", 50, 0 } }



 cFichero := hb_dirbase() + "MOISES.DBF"
 FErase( cFichero )


 nRet := DbCreate( cFichero, aStruct ) //, "DBFCDX" )
 Alert( "DbCreate() " + cValToChar( nRet ) )




 USE &cFichero NEW
 APPEND BLANK

 REPLACE FIELD->NAME  WITH "Test Moises"
 REPLACE FIELD->DATE  WITH Date()
 REPLACE FIELD->TEXTO WITH "Bla bla bla"
 DbGoTop()

 Browse()


DbCloseAll()

QUIT

RETURN NIL

Any clue?.

Thank you.

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Re: ADS and time fields
Posted: Fri Nov 21, 2014 12:05 PM

Moises,

DBFs are DBFs for ADS too, then for use other data types out of the classic DBF types you need to use ADT tables

regards

Marcelo

Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM
Re: ADS and time fields
Posted: Fri Nov 21, 2014 02:03 PM

Marcelo,

Thanks, but DBFS support this data type field, "T", so DBFS via ADS should also support it.

When changing adsSetFileType to ADSADI, how can I create a table with the timestamp field please?.

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM
Re: ADS and time fields
Posted: Sat Nov 22, 2014 11:22 AM

Solved,

Not supported and must use ADT tables.

http://devzone.advantagedatabase.com/fo ... s#fmanswer

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40

Continue the discussion