ADO RDD xHarbour
Re: ADO RDD xHarbour
Dear all,
Please apologize the misaligned code of aodrdd.prg but I only realize it now with Lucas.
Im using NotePad++ and although code is perfectly aligned there it seems thats not the case with MED that most of you are using.
As soon as I can I will passed it through MED to get it all aligned and Ill posted.
Please apologize the misaligned code of aodrdd.prg but I only realize it now with Lucas.
Im using NotePad++ and although code is perfectly aligned there it seems thats not the case with MED that most of you are using.
As soon as I can I will passed it through MED to get it all aligned and Ill posted.
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Antonio, for MSSQL should on line ~464 the [WA_ENGINE] "MSSQL" to be and not "SQL"!! And if the authentification to the DB without a password but with windows-authentification the text "Trusted_Connection=yes" should be used.
Code: Select all
CASE aWAData[ WA_ENGINE ] == "MSSQL"
aWAData[ WA_CONNECTION ]:Open( "Provider=SQLOLEDB;" + ;
"server=" + aWAData[ WA_SERVER ] + ;
";database=" + t_cDataSource + ;
iif(empty(aWAData[ WA_USERNAME ]),";Trusted_Connection=yes",;
";uid=" + aWAData[ WA_USERNAME ] + ;
";pwd=" + aWAData[ WA_PASSWORD ] ))
Re: ADO RDD xHarbour
Done!Antonio, for MSSQL should on line ~464 the [WA_ENGINE] "MSSQL" to be and not "SQL"!! And if the authentification to the DB without a password but with windows-authentification the text "Trusted_Connection=yes" should be used.
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
New adordd version at https://github.com/AHFERREIRA/adordd.git
The code is aligned and clean.
Please read carefully readme to set your app to use adordd.
And please dont forget donate to the humanitarian organization 20 Euros.
The code is aligned and clean.
Please read carefully readme to set your app to use adordd.
And please dont forget donate to the humanitarian organization 20 Euros.
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
New adordd English manual at https://github.com/AHFERREIRA/adordd.git
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Antonio in line 405 the code must be anstead:
And in line 5203 also the block of code MUST so:
Code: Select all
CASE aWAData[ WA_ENGINE ] == "SQL"
Code: Select all
CASE aWAData[ WA_ENGINE ] == "MSSQL"
Code: Select all
CASE cEngine == "MSSQL"
oCn:Open( "Provider=SQLOLEDB;" + ;
"server=" + cServer + ;
";database=" + cDB + ;
iif(empty(cUser),";Trusted_Connection=yes",;
";uid=" + cUser + ;
";pwd=" + cPass ))
Re: ADO RDD xHarbour
I try to open table in localhost (MySql), the result is below.
It took time to open 335,819 records. Is it normal?
Thanks,
It took time to open 335,819 records. Is it normal?
Code: Select all
.....
SET ADODBF TABLES INDEX LIST TO { {"CCRTBL",{"CCRTBL1","TBL_RMNO"},;
{"CCRTBL2","UPPER(TBL_LAST)"}}, ;
{"CCRGST",{"CCRGST1","GST_INTNO"}} ;
}
SET ADO TABLES INDEX LIST TO { {"CCRTBL",{"CCRTBL1","TBL_RMNO"}, ;
{"CCRTBL2","TBL_LAST"}}, ;
{"CCRGST",{"CCRGST1","GST_INTNO"}} ;
}
cSTime := time()
USE ccrgst ALIAS 'gst' NEW SHARED
cETime := time()
MsgInfo('Open Time : '+cSTime+' - '+cETime+' Reccount() : '+Str(gst->(Reccount())) )
Regards,
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Re: ADO RDD xHarbour
Dutch,
I would say thats normal.
The problem is when we use a table we read all records to ADO if we are using adUseClient as :CursorLocation.
With the index the time is doubled because ADORDD first issues a query SELECT * FROM... and then when you SE INDEX it issues another SELECT * FROM ORDER BY.
So 2 queries that read all records.
In these cases either you can set the query SELECT * FROM WHERE condition only to read the records you need might be only a few hundred but this will break code compatibility.
Other alternative try to use adUseServer together with CacheSize and the property Maximum Opens Rows.
CacheSize := 100
Maximum Opens Rows := 170
You will need to change the setup of MySql ODBC driver to enable dynamic cursors.
I dont know how ADORDD will behave because it might loose the :AbsolutePositon property but you can try it.
We will have to study this alternative in a next version.
May be Rao could help us with his knowledge of SQL ad ADO.
Besides that is it working ok?
I would say thats normal.
The problem is when we use a table we read all records to ADO if we are using adUseClient as :CursorLocation.
With the index the time is doubled because ADORDD first issues a query SELECT * FROM... and then when you SE INDEX it issues another SELECT * FROM ORDER BY.
So 2 queries that read all records.
In these cases either you can set the query SELECT * FROM WHERE condition only to read the records you need might be only a few hundred but this will break code compatibility.
Other alternative try to use adUseServer together with CacheSize and the property Maximum Opens Rows.
CacheSize := 100
Maximum Opens Rows := 170
You will need to change the setup of MySql ODBC driver to enable dynamic cursors.
I dont know how ADORDD will behave because it might loose the :AbsolutePositon property but you can try it.
We will have to study this alternative in a next version.
May be Rao could help us with his knowledge of SQL ad ADO.
Besides that is it working ok?
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
1) Function and Command to open/read/write, relation, dbsetfilter(), ordsetfocus(), dbseek() is working well.
2) open record with relation is quite slow. I think the point is JOIN table is the key. Because 'CCRGST' table (guest details) no need to open all records but only the records which related with main table 'CCRTBL' (reservation details).
Is it correct?
How do I join 2 table with ADORDD?
Thanks.
2) open record with relation is quite slow. I think the point is JOIN table is the key. Because 'CCRGST' table (guest details) no need to open all records but only the records which related with main table 'CCRTBL' (reservation details).
Is it correct?
How do I join 2 table with ADORDD?
Thanks.
Regards,
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
Hello,
Set relation works the same way as in DBFCDX.
Try at adordd.prg to comment out all cache settings. I am using ADORDD in a WAN scenario via Internet and speed is very good.
Set relation works the same way as in DBFCDX.
Try at adordd.prg to comment out all cache settings. I am using ADORDD in a WAN scenario via Internet and speed is very good.
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.
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.
Re: ADO RDD xHarbour
Dutch,
SELE 0
USE CVIEWNAME
If after you dont DROP VIEW (deleted ) next time you will not need to create it.
If you do you lll get a error but program will continue (I think)
You can use it like any other table.
Views are dynamic so always updated with last information.
What do you mean open record ?2) open record with relation is quite slow. I think the point is JOIN table is the key. Because 'CCRGST' table (guest details) no need to open all records but only the records which related with main table 'CCRTBL' (reservation details).
Is it correct?
hb_GetAdoConnection():Execute(" CREATE VIEW CVIEWNAME....")How do I join 2 table with ADORDD?
SELE 0
USE CVIEWNAME
If after you dont DROP VIEW (deleted ) next time you will not need to create it.
If you do you lll get a error but program will continue (I think)
You can use it like any other table.
Views are dynamic so always updated with last information.
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Lucas,
How many records the biggest table?lucasdebeltran wrote:Hello,
Set relation works the same way as in DBFCDX.
Try at adordd.prg to comment out all cache settings. I am using ADORDD in a WAN scenario via Internet and speed is very good.
Regards
Antonio H Ferreira
Antonio H Ferreira
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
30.000 records so far.
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.
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.