Funcion ADSSetCollation()

Funcion ADSSetCollation()

Postby Vikthor.Thomas » Thu Dec 03, 2015 9:56 pm

Un saludo a todos

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

Saludos
User avatar
Vikthor.Thomas
 
Posts: 144
Joined: Thu Jan 02, 2014 1:49 pm

Re: Funcion ADSSetCollation()

Postby Vikthor.Thomas » 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
Last edited by Vikthor.Thomas on Sat Dec 05, 2015 1:36 am, edited 1 time in total.
User avatar
Vikthor.Thomas
 
Posts: 144
Joined: Thu Jan 02, 2014 1:49 pm

Re: Funcion ADSSetCollation()

Postby Vikthor.Thomas » Sat Dec 05, 2015 1: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: Select all  Expand view

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 ?
User avatar
Vikthor.Thomas
 
Posts: 144
Joined: Thu Jan 02, 2014 1:49 pm


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 30 guests