FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ADO RDD xHarbour
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Re: ADO RDD xHarbour

Posted: Tue Jun 30, 2015 08:25 PM

Ok, now I am getting another error when trying to run tryadordd.exe. It is an argument error for the function RDDGETINFO().

Any ideas?

James

Application

Path and name: C:\Users\James\Documents\Projects\ADORDD\tryadordd.exe (32 bits)
Size: 3,059,712 bytes
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20130326)
FiveWin Version: FWHX 15.05
Windows version: 6.2, Build 9200

Time from start: 0 hours 0 mins 0 secs
Error occurred at: 06/30/15, 13:17:25
Error description: Error DBCMD/2019 Argument error: RDDINFO

Stack Calls

Called from: => RDDINFO( 0 )
Called from: adordd.prg => ADOLOCKCONTROL( 5325 )
Called from: tryadordd.prg => MAIN( 116 )

System

CPU type: AMD A8-4555M APU with Radeon(tm) HD Graphics 1600 Mhz
Hardware memory: 3271 megs

Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %

Windows total applications running: 3
1 GDI+ Window,
2 GDI+ Window, C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.9600.17415_none_dad8722c5bcc2d
3 Task Switching, C:\Users\James\Documents\Projects\ADORDD\tryadordd.exe

Variables in use

Procedure Type Value
==========================
RDDINFO
Param 1: N 5
Param 2: U
Param 3: C "DBFCDX"
Local 1: U
Local 2: U
ADOLOCKCONTROL
Param 1: C "D:\WHATEVER"
Param 2: C "DBFCDX"
Local 1: U
Local 2: U
Local 3: C "D:\WHATEVER\TLOCKS"
MAIN
Local 1: C ""
Local 2: U
Local 3: U
Local 4: U
Local 5: U
Local 6: U
Local 7: U

Linked RDDs

DBF
DBFFPT
DBFBLOB
DBFNTX
ADORDD

DataBases in use

Classes in use:

 1 ERROR
 2 HASHENTRY
 3 HBCLASS
 4 TOLEAUTO
 5 HBOBJECT
 6 TREG32

Memory Analysis

  380 Static variables

Dynamic memory consume:
Actual Value: 0 bytes
Highest Value: 0 bytes


FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Re: ADO RDD xHarbour

Posted: Tue Jun 30, 2015 08:56 PM

OK, here is the line erroring out.

TLOCKS->(DBSETINDEX(aLockCtrl[1]+RDDINFO(RDDI_ORDBAGEXT,,aLockCtrl[2]) ))

I have done a global search and I can't find any .H or .CH files containing the manifest constant RDDI_ORDBAGEXT. So that seems to be the problem. Anyone know which file contains that manifest constant? Or, at least know its value?

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Re: ADO RDD xHarbour

Posted: Tue Jun 30, 2015 10:08 PM

OK, it's not the manifest constant, it seems to be line 117 of TRYADORDD.PRG

//CONTROL LOCKING IN ADORDD FOR BOTH TABLE AND RECORD DONT PUT FINAL "\"
SET ADO LOCK CONTROL SHAREPATH TO  "D:\WHATEVER" RDD TO "DBFCDX"

I changed the "D:\WHATEVER" to "C:\WHATEVER" and created that directory, and I still get the same error.

I am not sure if it is expecting to find the database "test2.mdb" in that directory, or if it is going to create it if it is not found.

At least some of us are going to need some "Getting Started" instructions.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Re: ADO RDD xHarbour

Posted: Wed Jul 01, 2015 12:06 AM
Maybe someone can figure out why even this tiny test program won't run?

James

Code (fw): Select all Collapse
/*
Purpose: Simple as possible ADORDD test
Author : James Bott
Date 聽 : 6/30/2015 5:02:35 PM

*/

#include "adordd.ch"

REQUEST ADORDD, ADOVERSION

FUNCTION Main()

聽 聽RddRegister("ADORDD",1)
聽 聽RddSetDefault("ADORDD")

聽 聽SET ADO DEFAULT DATABASE TO "northwind.mdb" ;
聽 聽 聽 聽SERVER TO "Microsoft.Jet.OleDB.4.0" ;
聽 聽 聽 聽ENGINE TO "ACCESS"

聽 聽USE CUSTOMERS ALIAS "CUSTOMERS"
聽 聽BROWSE()

Return
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM

Re: ADO RDD xHarbour

Posted: Wed Jul 01, 2015 06:05 AM
James,

Please try this:

Code (fw): Select all Collapse
/*
Purpose: Simple as possible ADORDD test
Author : James Bott
Date   : 6/30/2015 5:02:35 PM

*/

#include "adordd.ch"

REQUEST ADORDD, ADOVERSION

FUNCTION Main()

   RddRegister("ADORDD",1)
   RddSetDefault("ADORDD")

    SET ADO TEMPORAY NAMES INDEX LIST TO {"TMP","TEMP", "TEMPORARY" }

  SET ADO DEFAULT RECNO FIELD TO "HBRECNO"

  SET AUTOPEN OFF 

  SET ADO FORCE LOCK OFF

 SET ADO DEFAULT DATABASE TO northwind.mdb" SERVER TO "" ENGINE TO "ACCESS" USER TO "" PASSWORD TO ""
  

   USE CUSTOMERS ALIAS "CUSTOMERS"
   BROWSE()

Return
Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producci贸n]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: ADO RDD xHarbour

Posted: Wed Jul 01, 2015 07:26 AM
Mr Lucas

Can you explain the purpose of
Code (fw): Select all Collapse
    SET ADO TEMPORAY NAMES INDEX LIST TO {"TMP","TEMP", "TEMPORARY" }

  SET ADO DEFAULT RECNO FIELD TO "HBRECNO"

and can we use XBROWE() instead of BROWSE() ?
Regards



G. N. Rao.

Hyderabad, India
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM

Re: ADO RDD xHarbour

Posted: Wed Jul 01, 2015 09:05 AM
Dear Mr. Nages,

Glad to hear from you.

For ensuring recno() we created an autoincremental field on each table. With this command is possible to change its name, particulary when the table is not created by DbCreate().

SET ADO TEMPORARY NAMES indicate the temporary indexes and destroyed after connection. So we can issue with ADORDD temporary indexes as:

Code (fw): Select all Collapse
INDEX ON FIELD->NAME TO TEMP TEMPORARY

or

INDEX ON FIELD->CITY TO TEMP TEMPORARY ADDITIVE


Here is the english manual:

https://github.com/AHFERREIRA/adordd/bl ... README.pdf

We await your feedback about ADORDD.

Thank you very much.
Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producci贸n]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM

Re: ADO RDD xHarbour

Posted: Wed Jul 01, 2015 09:06 AM

And yes, xBrowse() is working too!.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producci贸n]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Re: ADO RDD xHarbour

Posted: Wed Jul 01, 2015 01:43 PM

Lucas,

I still get the same "open" error with your code. I know this is a valid, working database as I can use if from another ADO app I wrote. I would also expect that the customers table already has an autoincrement field since it was (presumably) created by Access as the Northwind.mdb database is the standard Access sample database.

Also the ADORDD code I downloaded from GITHUB yesterday, so it is current as of then.

James

Application

Path and name: C:\Users\James\Documents\Projects\ADORDD\New4.exe (32 bits)
Size: 2,976,768 bytes
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20130326)
FiveWin Version: FWHX 15.05
Windows version: 6.2, Build 9200

Time from start: 0 hours 0 mins 0 secs
Error occurred at: 07/01/15, 06:40:02
Error description: Error BASE/1081 Argument error: +
Args:
[ 1] = C SELECT * FROM
[ 2] = U

Stack Calls

Called from: source\rdd\usrrdd\rdds\adordd.prg => ADO_OPEN( 0 )
Called from: => DBUSEAREA( 0 )
Called from: New4.prg => MAIN( 42 )

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Re: ADO RDD xHarbour

Posted: Wed Jul 01, 2015 01:55 PM

Lucas,

It would be very helpful if you could post a collection of a working PRG, EXE, and MDB that we could look at and test. Or, just email it to me as a zip attachment, but I am sure others would like to see it too.

I am sure there is a very simple mistake I am making, but I spent over 5 hours on this yesterday with no success.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Re: ADO RDD xHarbour

Posted: Wed Jul 01, 2015 02:17 PM

Lucas,

From your profile it appears that you are using Harbour, not xHarbour. Maybe that is an issue? I thought from the title of this message thread, that the ADORDD was being developed using xHarbour. I am using xHarbour.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM

Re: ADO RDD xHarbour

Posted: Wed Jul 01, 2015 02:18 PM

James,

Please send me your database and prg file to lucasdebeltran at gmail. com

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producci贸n]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Re: ADO RDD xHarbour

Posted: Wed Jul 01, 2015 03:14 PM

Lucas,

Sent to your email.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM

Re: ADO RDD xHarbour

Posted: Wed Jul 01, 2015 04:52 PM
Dear Mr James,

Here is working fine:



Which OS do you have?.

What error do you get?.
Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producci贸n]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: ADO RDD xHarbour

Posted: Wed Jul 01, 2015 04:57 PM

From the above error, it appears that ADORDD is internally generating an SQL statement "SELECT * FROM " + <tablename> to open the record set.

Instead oRs:Open( <tablename>, oCn, cursortype, locktype, adCmdTable ) // 5th parameter adCmdTable

In that rare occasion when the provider supports "scrollable server-side cursor", then adCmdTableDirect may be used after setting the cursor location to adUseServer and CursorType as adDynamic. In such cases the provider might even support adSeek
In this case we need to adopt workarounds for recordcount()

Regards



G. N. Rao.

Hyderabad, India