Page 50 of 70
Re: ADO RDD xHarbour
Posted: Tue Jun 30, 2015 7:18 pm
by James Bott
Lucas,
USRRDD.LIB did it. Thanks!
I sent a couple of hours trying to figure that out. Whew.
James
Re: ADO RDD xHarbour
Posted: Tue Jun 30, 2015 8:25 pm
by James Bott
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
Re: ADO RDD xHarbour
Posted: Tue Jun 30, 2015 8:56 pm
by James Bott
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
Re: ADO RDD xHarbour
Posted: Tue Jun 30, 2015 10:08 pm
by James Bott
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
Re: ADO RDD xHarbour
Posted: Wed Jul 01, 2015 12:06 am
by James Bott
Maybe someone can figure out why even this tiny test program won't run?
James
Code: Select all | Expand
/*
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
Re: ADO RDD xHarbour
Posted: Wed Jul 01, 2015 6:05 am
by lucasdebeltran
James,
Please try this:
Code: Select all | Expand
/*
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
Re: ADO RDD xHarbour
Posted: Wed Jul 01, 2015 7:26 am
by nageswaragunupudi
Mr Lucas
Can you explain the purpose of
Code: Select all | Expand
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() ?
Re: ADO RDD xHarbour
Posted: Wed Jul 01, 2015 9:05 am
by lucasdebeltran
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: Select all | Expand
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.pdfWe await your feedback about ADORDD.
Thank you very much.
Re: ADO RDD xHarbour
Posted: Wed Jul 01, 2015 9:06 am
by lucasdebeltran
And yes, xBrowse() is working too!.
Re: ADO RDD xHarbour
Posted: Wed Jul 01, 2015 1:43 pm
by James Bott
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 )
Re: ADO RDD xHarbour
Posted: Wed Jul 01, 2015 1:55 pm
by James Bott
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
Re: ADO RDD xHarbour
Posted: Wed Jul 01, 2015 2:17 pm
by James Bott
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
Re: ADO RDD xHarbour
Posted: Wed Jul 01, 2015 2:18 pm
by lucasdebeltran
James,
Please send me your database and prg file to lucasdebeltran at gmail. com
Re: ADO RDD xHarbour
Posted: Wed Jul 01, 2015 3:14 pm
by James Bott
Lucas,
Sent to your email.
James
Re: ADO RDD xHarbour
Posted: Wed Jul 01, 2015 4:52 pm
by lucasdebeltran
Dear Mr James,
Here is working fine:
Which OS do you have?.
What error do you get?.