Rao,
Thanks so myuch, you are right
I have one more quewstion (problem) with ERROR object of oRs:Open()
oErr:Description always return DISP_E_UNKNOWNNAME
and oErr:Number, oErr:Source, oErr:NativeError... dont exist.
oErr:modulename return nothing empty string
oErr:osthreadid return 0
oErr:procline return 0
oErr:procname return TOLEAUTO:OPEN
oErr:runningthreads return 0
oErr:vmthreadid return 0
Please some sugestion how to detect the error returned from server.
I use Informix database
Best Regards,
ADO RecordSet Fetch() ?
- nageswaragunupudi
- Posts: 10721
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
Re: ADO RecordSet Fetch() ?
Harbour shows the Ado Error correctly. xHarbour does not.
I suggest you use FWH function FW_ShowAdoError( oCn ), where oCn is the connection object.
TRY
oRs:Open( .... )
CATCH
FW_ShowAdoError( oCn )
<< decide what to do >>
END
I suggest you use FWH function FW_ShowAdoError( oCn ), where oCn is the connection object.
TRY
oRs:Open( .... )
CATCH
FW_ShowAdoError( oCn )
<< decide what to do >>
END
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: ADO RecordSet Fetch() ?
Rao,
In which version of fwh is addes function FW_ShowAdoError()
I still use 13.03
This mean that if i move to harbour from xharbour will work ok ?
If yes can i use FWH + bcc582 or i must use something else MSVC or ?
What kindd of changes i must to do if i move to harbour in my source ?
What is better choice xharbour or harbour ?
Global WHAT is the diference between harbour and xharbour ?
Best best regards,
In which version of fwh is addes function FW_ShowAdoError()
I still use 13.03
Harbour shows the Ado Error correctly. xHarbour does not.
This mean that if i move to harbour from xharbour will work ok ?
If yes can i use FWH + bcc582 or i must use something else MSVC or ?
What kindd of changes i must to do if i move to harbour in my source ?
What is better choice xharbour or harbour ?
Global WHAT is the diference between harbour and xharbour ?
Best best regards,
- nageswaragunupudi
- Posts: 10721
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
Re: ADO RecordSet Fetch() ?
The function FW_ShowAdoError() was first included in FWH 13.05.
The logic is well known to all users and it should be fine for me to share the code here. You may even find the main part of this code already posted in these forums
You may include this function in your libraries. You may even modify as you like.
For this purpose alone you need consider changing (x)Harbour.
Which is better is better explained by friends who are more knowledgeable than me.
I work with both xHarbour and Harbour for testing my contributions to FWH library.
Personally I still continue to use bcc582. For my personal software work using ADO, I still continue xHarbour. There is some functionality available in xHarbour but not in Harbour and I need that for some advanced usage of ADO. I am waiting for Harbour to provide similar functionality.
The logic is well known to all users and it should be fine for me to share the code here. You may even find the main part of this code already posted in these forums
Code: Select all | Expand
function FW_ShowAdoError( oCn, lSilent )
local nErr, oErr, cErr
DEFAULT lSilent := .f.
if ( nErr := oCn:Errors:Count ) > 0
oErr := oCn:Errors( nErr - 1 )
if ! lSilent
WITH OBJECT oErr
cErr := oErr:Description
cErr += CRLF + 'Source : ' + oErr:Source
cErr += CRLF + 'NativeError : ' + cValToChar( oErr:NativeError )
cErr += CRLF + 'Error Source : ' + oErr:Source
cErr += CRLF + 'Sql State : ' + oErr:SQLState
cErr += CRLF + Replicate( '-', 50 )
cErr += CRLF + ProcName( 1 ) + "( " + cValToChar( ProcLine( 1 ) ) + " )"
MsgAlert( cErr, IfNil( oCn:Provider, "ADO ERROR" ) )
END
endif
else
MsgAlert( "ADO ERROR UNKNOWN" )
endif
return oErr
You may include this function in your libraries. You may even modify as you like.
For this purpose alone you need consider changing (x)Harbour.
Which is better is better explained by friends who are more knowledgeable than me.
I work with both xHarbour and Harbour for testing my contributions to FWH library.
Personally I still continue to use bcc582. For my personal software work using ADO, I still continue xHarbour. There is some functionality available in xHarbour but not in Harbour and I need that for some advanced usage of ADO. I am waiting for Harbour to provide similar functionality.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: ADO RecordSet Fetch() ?
Rao, Rick, ...
Many thanks for reply and help
Many thanks to Adolfo for great manual which he send to me for ADO 2.8
i think someone need to put this manual on place where everyone can download it
Best regards to all
Many thanks for reply and help
Many thanks to Adolfo for great manual which he send to me for ADO 2.8
i think someone need to put this manual on place where everyone can download it
Best regards to all