ADO RDD xHarbour

Re: ADO RDD xHarbour

Postby AHF » Thu Sep 24, 2015 12:45 pm

Pieter,

Instead of:
Code: Select all  Expand view  RUN
REPLACE FIRST WITH "Test'Pieter"


Please try:

Code: Select all  Expand view  RUN
REPLACE FIRST WITH "Test''Pieter"
//2' '
or
Code: Select all  Expand view  RUN
REPLACE FIRST WITH "Test'Pieter"


and let me know the result.
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby pieter » Thu Sep 24, 2015 1:01 pm

(1)
REPLACE FIRST WITH "Test''Pieter" //gives Test'Pieter

(2) //I think this ' is the same as my previous post. (I copied your code to my testapp)
REPLACE FIRST WITH "Test'Pieter"

Gives:

Application
===========
Path and name: C:\Pieter\LeerOmgevingXharbour\learn-database.exe (32 bits)
Size: 2,781,696 bytes
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20150213)
FiveWin Version: FWHX 15.01
Windows version: 6.2, Build 9200

Time from start: 0 hours 0 mins 5 secs
Error occurred at: 09/24/15, 15:00:39
Error description: Error ADODB.Connection/0 S_OK: EXECUTE
Args:
[ 1] = C UPDATE CUSTOMER SET FIRST = 'Test'Pieter' WHERE HBRECNO = 520

Stack Calls
===========
Called from: => TOLEAUTO:EXECUTE( 0 )
Called from: adordd.prg => ADO_PUTVALUE( 1532 )
Called from: learn-database.prg => LEARNADORDD2( 56 )
Called from: learn-database.prg => MAIN( 22 )

System
======
CPU type: Intel(R) Pentium(R) CPU N3540 @ 2.16GHz 2166 Mhz
Hardware memory: 3500 megs

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

Windows total applications running: 4
1 ,
2 , C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.17810_none_a9edf0
3 DDE Server Window, C:\Windows\SYSTEM32\OLE32.DLL
4 Tussen taken schakelen, C:\Pieter\LeerOmgevingXharbour\learn-database.exe

Variables in use
================
Procedure Type Value
==========================
TOLEAUTO:EXECUTE
Param 1: C "UPDATE CUSTOMER SET FIRST = 'Test'Pieter' WHERE HBRECNO = 520"
Local 1: U
Local 2: C "ADODB.Connection"
ADO_PUTVALUE
Param 1: N 1
Param 2: N 2
Param 3: C "'Test'Pieter'"
Local 1: A Len: 38
Local 2: O Class: TOLEAUTO
Local 3: N 520
Local 4: A Len: 6
Local 5: U
Local 6: U
Local 7: A Len: 7
LEARNADORDD2
Local 1: C "Test'Pieter"
MAIN

Linked RDDs
===========
DBF
DBFFPT
DBFBLOB
DBFCDX
DBFNTX
ADORDD

DataBases in use
================

1: => CUSTOMER RddName: ADORDD
==============================
RecNo RecCount BOF EOF
520 520 .F. .F.

Indexes in use TagName

Relations in use

Classes in use:
===============
1 ERROR
2 HASHENTRY
3 HBCLASS
4 HBOBJECT
5 TFONT
6 TWINDOW
7 TDIALOG
8 TBRUSH
9 TCONTROL
10 TXBROWSE
11 TXBRWCOLUMN
12 TBTNBMP
13 TSCROLLBAR
14 TRECT
15 TOLEAUTO
16 VTWRAPPER
17 TREG32

Memory Analysis
===============
256 Static variables

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

User avatar
pieter
 
Posts: 117
Joined: Thu Jan 08, 2015 9:27 am

Re: ADO RDD xHarbour

Postby AHF » Thu Sep 24, 2015 1:29 pm

Pieter,

The second alternative is a escape \ + ' (take out the +)
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby pieter » Thu Sep 24, 2015 1:44 pm

Antonio F,

Thank you. Yes that also works.

Pieter
User avatar
pieter
 
Posts: 117
Joined: Thu Jan 08, 2015 9:27 am

Re: ADO RDD xHarbour

Postby Gale FORd » Thu Sep 24, 2015 3:32 pm

I use [] all the time to build filter strings and other cases where a single ' or " may be needed.
Try
Code: Select all  Expand view  RUN

REPLACE FIRST WITH [Test'Pieter]
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: ADO RDD xHarbour

Postby AHF » Fri Sep 25, 2015 8:08 pm

New version of adordd at https://github.com/AHFERREIRA/adordd.git

Several small bugs corrected.
SET ADO TABLES INDEX LIST TO not needed anymore.
Now support for any clipper expression in index including UDFs
Indexes, Scope, Filter, Seek, Locate 100% clipper compatible.
Speed much improved.
Now recordset its only read once when opening it.
New additions by others automatically detected.
New SET ADO INDEX UDFS TO to indicate to adordd the UDFs. This enables adordd to avoid
building unnecessary indexes with this routine because its expensive to use it.
Index data conversion functions must not be placed here.
Only place here true UDFs and functions that change the size of expressions itself.

TO DO
1) Deleted records not implemented yet.Will try to use maromano great routines.

2) New option in SET ADO DEFAULT DATABASE TO .. CLASSNAME where classname is a
class name providing ado methods and data to avoid using ado and oledb or odbc and making it much faster.
Im remembering the excellent work HDO from Manuel Exposito.
Then we can be really fast and multi platform.

3) Arrays of reserved keywords SET CHECK RESERVED KEYWORDS ON /OFF to check the existence of any sql reserved word and use a dictionary to avoid changing any code in actual apps.

This version has been tested in a small environment with MYSql and some new features might not be 100%.
These refers mainly to Scopes, UDFs in indexes, data synchronization
Place all necessary SETs in top of app, compile and link with adordd.
If you find some incompatibilities please report to change it.
It must run now with no code change!

Enrico, James can you try new features.?
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby Enrico Maria Giordano » Fri Sep 25, 2015 9:00 pm

AHF wrote:Enrico, James can you try new features.?


I'm very sorry but I didn't tried your ADORDD yet and I haven't the time to try it at the moment.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: ADO RDD xHarbour

Postby pieter » Mon Oct 05, 2015 11:30 am

Gale FORd wrote:I use [] all the time to build filter strings and other cases where a single ' or " may be needed.
Try
Code: Select all  Expand view  RUN

REPLACE FIRST WITH [Test'Pieter]


Hi Gale Ford,

thanks for your reply.(still a time ago I see :) )

I just tried it, it did not work by me. I got another solution for now which is: REPLACE FIRST WITH "Test''Pieter"

Kind regards,

Pieter
User avatar
pieter
 
Posts: 117
Joined: Thu Jan 08, 2015 9:27 am

Re: ADO RDD xHarbour

Postby AHF » Thu Oct 08, 2015 5:52 pm

New adordd version https://github.com/AHFERREIRA/adordd.git

1) Some small bugs corrections, code and speed improvement.

2) NEW FEATURE : Works with deleted records just like any other dbf rdd
Records are marked as deleted and they are removed from table with pack.
If you choose to let other applications not to work with deleted records this way when adordd resync or requery the set if the record does not exist anymore a error number 10002 is thrown and you should take care yourself
of re-position it in app code.
Adordd can not guess what to do in these cases.
Thanks to maromano!

3) New parameter in SET ADO DATABASE .. CLASSNAME to indicate an alternative class that should provide the methods and data needed by adordd. In this case it can work with other class that communicates directly with the DB engine. It can be much faster and multi platform.

next version

1) use path to create sql files and open with same path. slashes are change to minus sign. ready within 2 weeks

2) Taking care of field name conflicts with each sql engine reserved words.
Sometimes these occurrences are the source of very strange behavior and very difficult to identify.. (no time schedule yet)

2) Improved connection parameters such as Port, SSl encryption, compression, win auth, various replication servers, charset, table caching (no time schedule yet)

All trials have been made with ACCESS and MySql on production.
Please let me know if you find problems with other engines.
FireBird its uncompleted if you need it please let me know and we will try to include it together.

Enjoy it!
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby byte-one » Wed Oct 14, 2015 11:04 am

Antonio, please make definition of the local variables!

C:\adordd\adordd.prg(1238) Warning W0001 Ambiguous reference: 'XBOOK'
C:\adordd\adordd.prg(1247) Warning W0001 Ambiguous reference: 'ABOOKMARKS'
C:\adordd\adordd.prg(1248) Warning W0001 Ambiguous reference: 'ABOOKMARKS'
C:\adordd\adordd.prg(1248) Warning W0001 Ambiguous reference: 'ABOOKMARKS'
C:\adordd\adordd.prg(1249) Warning W0001 Ambiguous reference: 'ABOOKMARKS'
C:\adordd\adordd.prg(1250) Warning W0001 Ambiguous reference: 'XBOOK'
C:\adordd\adordd.prg(1478) Warning W0001 Ambiguous reference: 'OERROR'
C:\adordd\adordd.prg(1479) Warning W0001 Ambiguous reference: 'OERROR'
C:\adordd\adordd.prg(1480) Warning W0001 Ambiguous reference: 'OERROR'
C:\adordd\adordd.prg(1481) Warning W0001 Ambiguous reference: 'OERROR'
C:\adordd\adordd.prg(1482) Warning W0001 Ambiguous reference: 'OERROR'
C:\adordd\adordd.prg(1483) Warning W0001 Ambiguous reference: 'OERROR'
C:\adordd\adordd.prg(1523) Warning W0001 Ambiguous reference: 'CSQL'
C:\adordd\adordd.prg(1524) Warning W0001 Ambiguous reference: 'CSQL'
C:\adordd\adordd.prg(1526) Warning W0001 Ambiguous reference: 'CSQL'
C:\adordd\adordd.prg(2970) Warning W0001 Ambiguous reference: 'NDECMALS'
C:\adordd\adordd.prg(5413) Warning W0001 Ambiguous reference: 'CTABLE'
5800
No code generated

** error 1 ** deleting .\adordd.hrb
Drücken Sie eine beliebige Taste . . .
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: ADO RDD xHarbour

Postby AHF » Wed Oct 14, 2015 5:55 pm

Gunther,

Done!

Thanks
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby James Bott » Wed Oct 14, 2015 8:34 pm

Antonio,

Would you mind uploading the new version (with the LOCALs) declared to Github? As you know, unless they are declared they are PRIVATEs, so I don't want to do a lot of testing when PRIVATEs may be visible outside the RDD. I know, I could declare them myself, but then I would still have to retest when your version becomes available.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: ADO RDD xHarbour

Postby James Bott » Wed Oct 14, 2015 9:35 pm

Antonio,

It also seems that your TRYADORDD.PRG file has not been updated as it is erroring out with 3 errors. And there are undeclared vars too.

If would really help if you could provide in this test PRG, tests of all the new functions also. Otherwise each of us has to create test programs.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: ADO RDD xHarbour

Postby AHF » Thu Oct 15, 2015 9:59 am

James,

You re right but now I havent the time to remake it.

Ill try to do it as soon as I have the time.

Thanks
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby AHF » Fri Oct 16, 2015 7:55 am

New version adordd at https://github.com/AHFERREIRA/adordd.git

Please check 01_readme.pdf because some things changed a bit.

New features:

Use path to create sql files and open with same path. slashes are change to underscore sign.
This allow to use same tables name in the same database as with database file system folder tree.
Use SET ADO TABLENAME WITH PATH ON /OFF to enable this new feature.
All tables must of course have been loaded with the same SET.

As with other rdds you should use exactly the same routines to obtain a temporary file name from the operating
system file to be created and adordd will maintain automatically those temporary files deleting it
when not needed anymore.

Fieldnames with reserved keywords are enclosed in "`"+fieldname+"`" it seems to woks with any keyword.
Tested with MySql and ACCESS only but should wok with all others.

New SET ADO TABLENAME WITH PATH ON /OFF

New hb_AdoUpload( cBaseDir, cRDD, dbEngine, lOverWrite )
New HB_adorddFile( cFile) Replaces File()
New hb_ADOrddCOPYFILE( cTableOrigin, cTableDestination ) Replaces CopyFile()
New hb_adordddir( cPath ) imitates the directory() but on a SQL database where table names are with path.


next version

1) Persistent recordsets to open huge sets (> 1000000 k) very fast after first opening. (Already on trials)

2) Improved connection parameters such as Port, SSl encryption, compression, win auth, various replication servers, charset, table caching (no time schedule yet we are still studying if it is better to defined all at the ODBC or OLEDB level)
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 79 guests

cron