ADO RDD xHarbour
Re: ADO RDD xHarbour
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?
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
Antonio H Ferreira
Re: ADO RDD xHarbour
Antonio, sorry, no tables!
I test
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!!!
I test
Code: Select all
DbCreate( "table2;test2.mdb", ....
DbCreate( "table2;test2", ....
DbCreate( "table2;\test2.mdb", ....
THANKS, ALL IS OK!!!
Re: ADO RDD xHarbour
Gunther,
Do it just like in clipper DbCreate( "table2,{...)
Is SET ADO DEFAULT DATABASE TO TESTADORDD.MDB ? Isnt the table there instead ?
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
Antonio H Ferreira
Re: ADO RDD xHarbour
Antonio, please see my earlier post!
All is ok now!
Thanks for your great work!
All is ok now!
Thanks for your great work!
Re: ADO RDD xHarbour
In tryadordd.prg change
in
Code: Select all
IF !FILE( "\TESTADORDD.mdb" )
Code: Select all
IF !hb_adoRddExistsTable( ,"table1")
Re: ADO RDD xHarbour
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
minor bugs corrections
better detection of refreshing new records added by others
improvement speed in replaces
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Antonio in line 927
should be removed!
An other technical question:
In which moment the indexes are build??
Thanks
Code: Select all
nSecs := Seconds()
An other technical question:
In which moment the indexes are build??
Thanks
Re: ADO RDD xHarbour
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.
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
Antonio H Ferreira
Re: ADO RDD xHarbour
Antonio, and for clearness:
In which cases UDF-Indexes are required and can i use in normal indexes (with SORT) all Harbour functions?
In which cases UDF-Indexes are required and can i use in normal indexes (with SORT) all Harbour functions?
Re: ADO RDD xHarbour
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?
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
Antonio H Ferreira
Re: ADO RDD xHarbour
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!?
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!?
Re: ADO RDD xHarbour
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?
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
Antonio H Ferreira
Re: ADO RDD xHarbour
Antonio, where in hb_AdoUpload() (or in other function) are this conversations to do? As parameter Y/N?
Re: ADO RDD xHarbour
Gunther,
Sorry I misunderstood.
Can you post the error?
Sorry I misunderstood.
Can you post the error?
Regards
Antonio H Ferreira
Antonio H Ferreira