Beginners Error With ADO (Harbour)

Post Reply
MichaelMo
Posts: 55
Joined: Thu Feb 15, 2007 1:35 am

Beginners Error With ADO (Harbour)

Post 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)
lailton.webmaster
Posts: 603
Joined: Sun May 04, 2008 8:44 pm

Re: Beginners Error With ADO (Harbour)

Post by lailton.webmaster »

HI,

I think that u need add lib rdd.lib in your project.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Beginners Error With ADO (Harbour)

Post by Antonio Linares »

Michael,

Are you linking AdoRdd.lib ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
MichaelMo
Posts: 55
Joined: Thu Feb 15, 2007 1:35 am

Re: Beginners Error With ADO (Harbour)

Post 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.
MichaelMo
Posts: 55
Joined: Thu Feb 15, 2007 1:35 am

Re: Beginners Error With ADO (Harbour)

Post 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
MichaelMo
Posts: 55
Joined: Thu Feb 15, 2007 1:35 am

Re: Beginners Error With ADO (Harbour)

Post 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.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Beginners Error With ADO (Harbour)

Post 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 :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply