ADO RDD xHarbour
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: ADO RDD xHarbour
Lets review Harbour's usrrdd.c code:
It seems as hb_usrItemToFieldInfo( hb_param( 2, HB_IT_ARRAY ) takes the value from the array and fill a structure
5 elements
Code: Select all
HB_FUNC_UR_SUPER( ADDFIELD )
{
AREAP pArea = hb_usrGetAreaParam( 2 );
if( pArea )
{
DBFIELDINFO dbFieldInfo;
if( hb_usrItemToFieldInfo( hb_param( 2, HB_IT_ARRAY ), &dbFieldInfo ) )
{
hb_retni( SUPER_ADDFIELD( pArea, &dbFieldInfo ) );
}
else
{
hb_usrErrorRT( pArea, EG_ARG, EDBCMD_NOVAR );
hb_retni( HB_FAILURE );
}
}
}
Code: Select all
static HB_BOOL hb_usrItemToFieldInfo( PHB_ITEM pItem, LPDBFIELDINFO pFieldInfo )
{
if( pItem && hb_arrayLen( pItem ) == UR_FI_SIZE )
{
pFieldInfo->atomName = hb_usrArrayGetCPtr( pItem, UR_FI_NAME );
pFieldInfo->uiType = ( HB_USHORT ) hb_arrayGetNI( pItem, UR_FI_TYPE );
pFieldInfo->uiTypeExtended = ( HB_USHORT ) hb_arrayGetNI( pItem, UR_FI_TYPEEXT );
pFieldInfo->uiLen = ( HB_USHORT ) hb_arrayGetNI( pItem, UR_FI_LEN );
pFieldInfo->uiDec = ( HB_USHORT ) hb_arrayGetNI( pItem, UR_FI_DEC );
return HB_TRUE;
}
return HB_FALSE;
}
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: ADO RDD xHarbour
Antonio,
Passed array its corrected.This is the print out:
aField[ UR_FI_NAME ] = NRENCOMEND
aField[ UR_FI_TYPE ] = 1
aField[ UR_FI_TYPEEXT ] = 0
aField[ UR_FI_LEN ] = 10
aField[ UR_FI_DEC ] = 0
It seems the error its not here.
Passed array its corrected.This is the print out:
aField[ UR_FI_NAME ] = NRENCOMEND
aField[ UR_FI_TYPE ] = 1
aField[ UR_FI_TYPEEXT ] = 0
aField[ UR_FI_LEN ] = 10
aField[ UR_FI_DEC ] = 0
It seems the error its not here.
Regards
Antonio H Ferreira
Antonio H Ferreira
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: ADO RDD xHarbour
Antonio,
What harbour version are you using ?
What harbour version are you using ?
Re: ADO RDD xHarbour
AHF wrote:Antonio,
Im working with FWH October 2008 and xHarbour Sept 2008 .
Is this the reason?
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Antonio,
I checked usrrdd.c from xHarbour and it expects aField[ UR_FI_FLAGS ] aField[ UR_FI_STEP ] that I now send := 0.
Its ok now
Will keep you posted
I checked usrrdd.c from xHarbour and it expects aField[ UR_FI_FLAGS ] aField[ UR_FI_STEP ] that I now send := 0.
Its ok now
Will keep you posted
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
I save a password with functions FwEncrypt and Fwdecrypt but the charater returned doesnt correspond to what is in that field.
I think this has something to do with charset
Any solutions?
I think this has something to do with charset
Any solutions?
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Antono,
There is a problem with the field:type.
When its dbf field "N" with 0 decimals it returns a double with 2 decimal places.
How can we make this conversion when uploading dbfs as tables for ex to mysql or working with dbfs directly ?
There is a problem with the field:type.
When its dbf field "N" with 0 decimals it returns a double with 2 decimal places.
How can we make this conversion when uploading dbfs as tables for ex to mysql or working with dbfs directly ?
Regards
Antonio H Ferreira
Antonio H Ferreira
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: ADO RDD xHarbour
Very good!AHF wrote:Antonio,
I checked usrrdd.c from xHarbour and it expects aField[ UR_FI_FLAGS ] aField[ UR_FI_STEP ] that I now send := 0.
Its ok now
Will keep you posted
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: ADO RDD xHarbour
Lets ask Mr. Rao about this as he is a great expert with SQL.AHF wrote:Antono,
There is a problem with the field:type.
When its dbf field "N" with 0 decimals it returns a double with 2 decimal places.
How can we make this conversion when uploading dbfs as tables for ex to mysql or working with dbfs directly ?
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: ADO RDD xHarbour
Try to use Harbour encrypt/decrypt functions to see if that solves the problem.AHF wrote:I save a password with functions FwEncrypt and Fwdecrypt but the charater returned doesnt correspond to what is in that field.
I think this has something to do with charset
Any solutions?
I don't remember right now the exact names that those functions have.
Re: ADO RDD xHarbour
Antonio,
The application crashes without any error in the following condition:
ACTIVATE WINDOW … ON INIT initial() …
Function Initial()
Use dbf
Do while !eof()
…..
Dbskip()
Enddo
If the same function is called out of ON INIT clause its ok.
If I call browse() before the Do While in any condition its ok
The crash occours in the oRecordSet:move(nTotSkip) in ADO_SKIPRAW() inside the do while og Initial().
What might be the problem?
The application crashes without any error in the following condition:
ACTIVATE WINDOW … ON INIT initial() …
Function Initial()
Use dbf
Do while !eof()
…..
Dbskip()
Enddo
If the same function is called out of ON INIT clause its ok.
If I call browse() before the Do While in any condition its ok
The crash occours in the oRecordSet:move(nTotSkip) in ADO_SKIPRAW() inside the do while og Initial().
What might be the problem?
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Antonio,Antonio Linares wrote:Try to use Harbour encrypt/decrypt functions to see if that solves the problem.AHF wrote:I save a password with functions FwEncrypt and Fwdecrypt but the charater returned doesnt correspond to what is in that field.
I think this has something to do with charset
Any solutions?
I don't remember right now the exact names that those functions have.
The first password was created with ADS.
ADORDD returns wrong chars.
This is a charset problem because if I reset the password with ADORDD a create a new one its ok!
How can I change the charset in ADO to be the same of ADS being ADS Collation=ansi or OEM character set = PORTUGUE Ansi CHARATER SET = Portuguese ?
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Antonio,
Can you test this and confirm it?
Can you test this and confirm it?
AHF wrote:Antonio,
The application crashes without any error in the following condition:
ACTIVATE WINDOW … ON INIT initial() …
Function Initial()
Use dbf
Do while !eof()
…..
Dbskip()
Enddo
If the same function is called out of ON INIT clause its ok.
If I call browse() before the Do While in any condition its ok
The crash occours in the oRecordSet:move(nTotSkip) in ADO_SKIPRAW() inside the do while og Initial().
What might be the problem?
Regards
Antonio H Ferreira
Antonio H Ferreira