Page 1 of 1

Beginners Error With ADO (Harbour)

Posted: Thu Dec 24, 2009 5:01 pm
by MichaelMo
I'm trying to get my feet wet with ADO in Harbour, but I'm evidently missing a necessary file. When I attempt to compile my simple code, I get the following compile error:

Error: Unresolved external '_HB_FUN_ADORDD' referenced from C:\32BIT\OCW\DEBUG\TRANSFER.OBJ

Can anyone tell me what I didn't add to my project that I'm evidently missing?

I don't think it has anything to do with the code I'm calling:
USE test.mdb VIA "ADORDD"
BROWSE()
USE

I did add :

REQUEST ADORDD

to the top of the PRG file where the test code is sitting.

FYI, I'm currently using Harbour and a Jan 09 version of Fivewin. I am builing the program in UESTUDIO with the Borland Compiler.


--------------------Configuration: ocw - Debug--------------------
Harbour 1.0.1dev Intl. (Rev. 9361)
Copyright (c) 1999-2008, http://www.harbour-project.org/
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
menu.c:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external '_HB_FUN_ADORDD' referenced from C:\32BIT\OCW\DEBUG\TRANSFER.OBJ
ocw.EXE - 1 error(s), 0 warning(s)

Re: Beginners Error With ADO (Harbour)

Posted: Thu Dec 24, 2009 8:19 pm
by lailton.webmaster
HI,

I think that u need add lib rdd.lib in your project.

Re: Beginners Error With ADO (Harbour)

Posted: Fri Dec 25, 2009 8:54 pm
by Antonio Linares
Michael,

Are you linking AdoRdd.lib ?

Re: Beginners Error With ADO (Harbour)

Posted: Sat Dec 26, 2009 7:11 am
by MichaelMo
No I didn't, and that was the problem. :) Once I added that lib and usrrdd.lib to the .mak file, everything worked perfectly. Thank you.

Re: Beginners Error With ADO (Harbour)

Posted: Sat Dec 26, 2009 8:21 am
by MichaelMo
Ok, maybe not "perfectly". :)

I can now open and browse the database I'm after, but when I hit the last record by scrolling down the browse or with a simple skip command, I get the following error:

Error description: Error ADODB.Recordset/6 DISP_E_UNKNOWNNAME: STATUS
Args:

Stack Calls
===========
Called from: => TOLEAUTO:STATUS(0)
Called from: adordd.prg => ADO_DELETED(333)
Called from: => DBSKIPPER(0)
Called from: => (b)SETFILTER(1853)
Called from: => TWBROWSE:SKIP(1585)
Called from: => TWBROWSE:GODOWN(898)
Called from: => TWBROWSE:MOUSEWHEEL(1925)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: => TWBROWSE:HANDLEEVENT(1451)
Called from: .\source\classes\WINDOW.PRG => _FWH(3333)

The adordd.prg file has the following date in the header:

* $Id: adordd.prg,v 1.4 2007/04/29 10:41:43 antoniolinares Exp $


How can I be sure I have the newest adordd.lib file and usrrdd.lib file?

The code in question from the adordd.prg file is the following:

STATIC FUNCTION ADO_DELETED( nWA, lDeleted )

local oADO := USRRDD_AREADATA( nWA )[ 1 ]

------> IF oADO:Status == adRecDeleted // To be checked, ACCESS does not uses it <-------
lDeleted := .T.
ELSE
lDeleted := .F.
ENDIF

RETURN SUCCESS

Re: Beginners Error With ADO (Harbour)

Posted: Sat Dec 26, 2009 11:12 am
by MichaelMo
FYI, I was able to work around the problem, and convert the data I was after by calling a recnumber() function and using a while loop to make sure it never tried to skip past the last record. I'd still like to make sure I'm using the current libs.

Re: Beginners Error With ADO (Harbour)

Posted: Sat Dec 26, 2009 11:18 am
by Antonio Linares
Michael,

It seems as you are using Access database engine and see the comment in the error line that you have posted:

> ------> IF oADO:Status == adRecDeleted // To be checked, ACCESS does not uses it <-------

It seems as Access does not support it. Try to comment those lines and check it again, thanks :-)