FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Funcion ADSSetCollation()
Posts: 144
Joined: Thu Jan 02, 2014 01:49 PM
Funcion ADSSetCollation()
Posted: Thu Dec 03, 2015 09:56 PM

Un saludo a todos

Alguien ha usado la funci贸n ADSSetcollation() de Advantage ?

Saludos

Posts: 144
Joined: Thu Jan 02, 2014 01:49 PM
Re: Funcion ADSSetCollation()
Posted: Sat Dec 05, 2015 12:32 AM
Saludos a todos

La funci贸n AdsSetCollation() no la ten铆a en los fuentes de Adsfunc.c

--------------------------------------------------
Sets the collation language on a connection.
Syntax
UNSIGNED32 AdsSetCollation( ADSHANDLE hConnect,UNSIGNED8 *pucCollation );
Parameters
hConnect (I) A connection handle.
pucCollation (I) The collation language to be set.
--------------------------------------------------

Comparto con ustedes el c贸digo que escrib铆

/*
Vikthor 2015.12.04
*/
HB_FUNC( ADSSETCOLLATION )
{
HB_BOOL fResult = HB_FALSE;
ADSHANDLE hConnect = HB_ADS_PARCONNECTION( 1 );
if( hConnect )
{
fResult = AdsSetCollation( hConnect, ( UNSIGNED8 * ) hb_parcx( 2 ) );
}
hb_retl( fResult );
}

Sin embargo la funci贸n no resuelve mi problema inicial.
Lo que requiero hacer es definir la "Collection" a usar con OEM

Cualquier consejo, sugerencia o tip es bienvenido

Saludos
Posts: 144
Joined: Thu Jan 02, 2014 01:49 PM
Re: Funcion ADSSetCollation()
Posted: Sat Dec 05, 2015 01:34 AM
Y sigo con el tema


La documentaci贸n de la funci贸n AdsGetCollation() es la siguiente:


UNSIGNED32 AdsGetCollation( ADSHANDLE hConnect,UNSIGNED8 *pucCollation,UNSIGNED16 *pusLen );

Parameters :
hConnect (I) A connection handle.
pucCollation (O) The collation language of the connection, or an empty string.
pusLen (I/O) Length of given buffer on input, length of returned data on output.

Aqu铆 est谩 la funci贸n que escrib铆 :
Code (fw): Select all Collapse
HB_FUNC( ADSGETCOLLATION )
{
聽 聽HB_BOOL fResult = HB_FALSE;
聽 聽ADSHANDLE hConnect = HB_ADS_PARCONNECTION( 1 );
聽 聽UNSIGNED8 aucCollation[ 16 ];
聽 聽UNSIGNED16 usLen = sizeof( aucCollation );

聽 聽if( hConnect )
聽 聽{
聽 聽 聽 聽fResult = AdsGetCollation( hConnect, aucCollation, &usLen );
聽 聽}

聽 聽hb_retc( aucCollation );
}


Pero no est谩 funcionado correctamente, alguna sugerencia ?

Continue the discussion