ADO RDD xHarbour

Re: ADO RDD xHarbour

Postby AHF » Tue Oct 20, 2015 3:29 pm

Gunther,

Those are left overs from trials.
Take out ";cpath" you dot need it anymore. The database its auto created if not exist during connection.

In fact if you verify the table was created in the database indicated in SET ADO DEFAULT DATABASE...

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

Re: ADO RDD xHarbour

Postby byte-one » Tue Oct 20, 2015 3:43 pm

Antonio, sorry, no tables!
I test
Code: Select all  Expand view
DbCreate( "table2;test2.mdb", ....
DbCreate( "table2;test2", ....
DbCreate( "table2;\test2.mdb", ....


Antonio, i found MY bug! I check with file() the .MdB and as she is produced on connection i never come to the dbcreate()...

THANKS, ALL IS OK!!!
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 » Tue Oct 20, 2015 3:53 pm

Gunther,

Do it just like in clipper DbCreate( "table2,{...)
Is SET ADO DEFAULT DATABASE TO TESTADORDD.MDB ? Isnt the table there instead ?
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby byte-one » Tue Oct 20, 2015 4:00 pm

Antonio, please see my earlier post!
All is ok now!

Thanks for your great work!
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 byte-one » Tue Oct 20, 2015 4:45 pm

In tryadordd.prg change

Code: Select all  Expand view
IF !FILE(   "\TESTADORDD.mdb"   )
in
Code: Select all  Expand view
IF !hb_adoRddExistsTable( ,"table1")
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 » Tue Oct 20, 2015 5:04 pm

Gunther,

Done.

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

Re: ADO RDD xHarbour

Postby AHF » Wed Oct 21, 2015 9:57 pm

New build adordd ver 1.0 at https://github.com/AHFERREIRA/adordd.git

minor bugs corrections
better detection of refreshing new records added by others
improvement speed in replaces
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby byte-one » Thu Oct 22, 2015 1:44 pm

Antonio in line 927
Code: Select all  Expand view
nSecs := Seconds()

should be removed!

An other technical question:
In which moment the indexes are build??

Thanks
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 » Thu Oct 22, 2015 2:24 pm

Gunther,

Left overs! Done!

Indexes without UDFs are not really created they are transform into ado_sort.
This is done when calling set order to, ordsetfocus just like in clipper resuming when the order becomes active.

Indexes with UDFs are created either with index on... or created with ordsetfocus if the index is in SET ADODBF INDEX...
These indexes are really an array of bookmarks ordered by eval key expression thats why they should be avoided as much as possible.
These arrays of bookmarks are auto maintained by adordd and as key expression is altered or added the same way as clipper.

Resuming:
Indexes without UDFs are extremely fast to build as :sort its extremely fast. Here tests with MySql tables > 800.000 recs its immediate.

Indexes with UDFS without a while clause or not with a SCOPE are much slower as all records must be read, added to the array and sort after the array. This only happens once during the application life time.
However its not too slow its still workable.

Indexes with UDFS with a while clause depends of the size of the range.

I hope Ive made it clear.
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby byte-one » Thu Oct 22, 2015 9:00 pm

Antonio, and for clearness:
In which cases UDF-Indexes are required and can i use in normal indexes (with SORT) all Harbour functions?
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 » Thu Oct 22, 2015 9:19 pm

Gunther,

In Harbour indexes we have 2 kind of functions.

1st the ones we are obliged to use because we must have only one data type in the index expression. The big part!
These are conversion data type functions that is not needed in ADO :sort thus adordd extracts the fields and is straight forward. You dont need to worry about these and do not need to be included in SET UDFS. ( EX. DTOS, DTOC, STR, VAL, ETC)

2nd the ones that alter the index expression value for ex SUBSTR or IF( fieldvalue, "1", "2" ) var evaluation & true User Defined Functions.
These we have to declare as UDFS because they need to be evaluated by Harbour and they can not be evaluated by Sort .

Is it clear for you?
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby byte-one » Fri Oct 23, 2015 12:10 pm

Antonio, now is clear! Thanks.

Now i have converted with your function some DBFs to MSSQL. All is ok, but if in a character- or Memofield is a single Quote, a error occurs! This quotes should be converted in another character!?
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 » Fri Oct 23, 2015 12:24 pm

Gunther,

I decided not to translate these strings at adordd because then problems come with passwords, encrypted strings etc. Thus the user has to decide himself how he pretends to save it.
If anyone has a better idea we can try to include it in adordd.

You can try

STRTRAN( cStr, "'" , "''" )

or

STRTRAN( cStr, "'","\'") //Im not sure about the escape char

Did it work?
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby byte-one » Fri Oct 23, 2015 12:48 pm

Antonio, where in hb_AdoUpload() (or in other function) are this conversations to do? As parameter Y/N?
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 » Fri Oct 23, 2015 1:14 pm

Gunther,

Sorry I misunderstood.

Can you post the error?
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: No registered users and 87 guests