ADO RDD xHarbour
Re: ADO RDD xHarbour
Lucas,
ConnectionTimeout does not function the way we needed this only avoids the timeout default of 15s of ado.
If you set it to 0 ado will try forever otherwise throws error.
I think we should set it to 60 seconds then ask the user if he likes to continue trying.
The DBA from our client advise us to do the following:
Place a timer pinging to the server
When it fails close the connection and open a new one.
The recordsets should remain ok
I just don't know if then we would need a :filter to have all pending records updates and to skip through all of them issuing the updates failed during the time of the lost connection.
Or
Configure the OleDb or ODBC to avoid that enabling automatic reconnect.
How can we catch the connection lost error?
Do you or anyone have any experience with this. Mr Rao? Enrico? Rick?
ConnectionTimeout does not function the way we needed this only avoids the timeout default of 15s of ado.
If you set it to 0 ado will try forever otherwise throws error.
I think we should set it to 60 seconds then ask the user if he likes to continue trying.
The DBA from our client advise us to do the following:
Place a timer pinging to the server
When it fails close the connection and open a new one.
The recordsets should remain ok
I just don't know if then we would need a :filter to have all pending records updates and to skip through all of them issuing the updates failed during the time of the lost connection.
Or
Configure the OleDb or ODBC to avoid that enabling automatic reconnect.
How can we catch the connection lost error?
Do you or anyone have any experience with this. Mr Rao? Enrico? Rick?
Regards
Antonio H Ferreira
Antonio H Ferreira
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
Antonio,
Filters seem to be working ok.
I have to do more tests.
Congrats !!.
Also, I have to say that your ADORDD is much faster than SQLRDD from xHarbour.com and Patrick Mast.
Thank you.
Filters seem to be working ok.
I have to do more tests.
Congrats !!.
Also, I have to say that your ADORDD is much faster than SQLRDD from xHarbour.com and Patrick Mast.
Thank you.
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
Lucas,
I just emailed you a new version with:
Filters with updates and addnew and indexes completed.
Index on now adds the index to the opened indexes list. You can use after just ordsetfocus().
Please check it and let me know your findings.
Just got from the trials in our client that the speed might be much improved in relations were we are querying with select the table and now we are trying using a clone set with :filter finding the recno in the main set.
Also there is a problem in the connection property "Maximum Open Rows" that we cannot set because iits always read only.
This prop together with CacheSize has a huge impact on select * in big tables.
We are trying to find how to do it.
Do you have any knowledge about this? Maybe Mr Rao.
Concerning lost connections see my email.
Thanks.
I just emailed you a new version with:
Filters with updates and addnew and indexes completed.
Index on now adds the index to the opened indexes list. You can use after just ordsetfocus().
Please check it and let me know your findings.
Great to know.Also, I have to say that your ADORDD is much faster than SQLRDD from xHarbour.com and Patrick Mast.
Just got from the trials in our client that the speed might be much improved in relations were we are querying with select the table and now we are trying using a clone set with :filter finding the recno in the main set.
Also there is a problem in the connection property "Maximum Open Rows" that we cannot set because iits always read only.
This prop together with CacheSize has a huge impact on select * in big tables.
We are trying to find how to do it.
Do you have any knowledge about this? Maybe Mr Rao.
Concerning lost connections see my email.
Thanks.
Regards
Antonio H Ferreira
Antonio H Ferreira
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
Antonio,
With the version you send me a coupple of hours ago, filters are failing again.
With the version you send me a coupple of hours ago, filters are failing again.
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
Lucas,
Sorry it was my mistake.
Please see my email.
Sorry it was my mistake.
Please see my email.
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Lucas,
Concerning connection lost control I just receive a information from our client to try this way:
Timer issuing a dummy query to the server or checking state of the connection.
If it fails "locks" immediately all updates to the recordset and only "unlocks" updates when the connection come back again.
I hope this is possible.
It seems that since the actual connection is lost any pending transactions will be rolled back. (this is with their server) I dont know if it is like this elsewhere.
Thus we are going this way. Does anynone has any other better alternative?
Concerning connection lost control I just receive a information from our client to try this way:
Timer issuing a dummy query to the server or checking state of the connection.
If it fails "locks" immediately all updates to the recordset and only "unlocks" updates when the connection come back again.
I hope this is possible.
It seems that since the actual connection is lost any pending transactions will be rolled back. (this is with their server) I dont know if it is like this elsewhere.
Thus we are going this way. Does anynone has any other better alternative?
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Lucas,
Concerning eval error this only happens when you dont have a active filter Right?
Concerning eval error this only happens when you dont have a active filter Right?
Regards
Antonio H Ferreira
Antonio H Ferreira
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
Yes.
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.
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: ADO RDD xHarbour
Antonio,
EMG
What about TRY/CATCH/END?AHF wrote:How can we catch the connection lost error?
Do you or anyone have any experience with this. Mr Rao? Enrico? Rick?
EMG
Re: ADO RDD xHarbour
Enrico,
Thanks but we choose other way.
adordd will use a timer to keep connection live.
And a test in certain routines to see if it is connected otherwise it let you do anything but:
Updates, New records, changing index orders
You will continue to work disconnected and as soon as you get connected again everything comes back to normal operation.
With this we hope to avoid lost connection for the lack of activity
Nevertheless if you loose con you continue to work but with some limitations
I didnt try it yet.
Thanks but we choose other way.
adordd will use a timer to keep connection live.
And a test in certain routines to see if it is connected otherwise it let you do anything but:
Updates, New records, changing index orders
You will continue to work disconnected and as soon as you get connected again everything comes back to normal operation.
With this we hope to avoid lost connection for the lack of activity
Nevertheless if you loose con you continue to work but with some limitations
I didnt try it yet.
Regards
Antonio H Ferreira
Antonio H Ferreira
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
Antonio,
There are the post I was refering to:
http://forums.fivetechsupport.com/viewt ... dset+local
http://fivetechsupport.com/forums/viewt ... do#p161538
Thanks.
There are the post I was refering to:
http://forums.fivetechsupport.com/viewt ... dset+local
http://fivetechsupport.com/forums/viewt ... do#p161538
Thanks.
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.
- lucasdebeltran
- Posts: 1303
- Joined: Tue Jul 21, 2009 8:12 am
- Contact:
Re: ADO RDD xHarbour
Antonio,
xBrowse feature wildseek is not working.
When you type values, it filters, but when you start deleting such value filtered records are still on xbrowse.
Please test this code with DBFCDX and ADORDD:
At. :cFilterFld := "FIRST" you have to indicate the field you want to filter for.
Thank you.
xBrowse feature wildseek is not working.
When you type values, it filters, but when you start deleting such value filtered records are still on xbrowse.
Please test this code with DBFCDX and ADORDD:
At. :cFilterFld := "FIRST" you have to indicate the field you want to filter for.
Code: Select all
//-----------------------------------------------------------------------------
function testWildSeek( cAlias )
//-----------------------------------------------------------------------------
local oDlg, oBrw, oCbx, oFont, nWild := 2
local nOpt := 1
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 900,400 PIXEL ;
TITLE "Test WildSeek v. 3 "+FWVERSION ;
FONT oFont
@ 30,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
DATASOURCE cAlias AUTOCOLS AUTOSORT ;
CELL LINES NOBORDER
WITH OBJECT oBrw
:nMarqueeStyle := 4
:lIncrFilter := .t.
:lSeekWild := .t.
:cFilterFld := "FIRST"
:nStretchCol := STRETCHCOL_WIDEST
:CreateFromCode()
END
/*
@ 10,10 COMBOBOX nOpt PROMPTS { "Starting With", "Containing" } ;
SIZE 60,44 PIXEL OF oDlg ;
ON CHANGE ( oBrw:lSeekWild := ( nOpt == 2 ), ;
oBrw:Seek( If( oBrw:lSeekWild, oBrw:cSeek, "" ) ),;
oBrw:Refresh(), oBrw:SetFocus() )
*/
@ 10, 80 SAY oBrw:oSeek PROMPT oBrw:cSeek SIZE 120,10 PIXEL OF oDlg ;
COLOR CLR_RED,CLR_YELLOW
@ 10, 210 BUTTON "Clean xBrowse WildSeek" ACTION ( oBrw:Seek( "" ), oBrw:Setfocus() ) PIXEL
@ 10, 350 BUTTON "DbClearFilter()" ACTION ( msgalert( dbfilter(), "ACTIVE FILTER" ), dbclearfilter(), oBrw:Setfocus() ) PIXEL
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( oBrw:SetFocus(), .f. )
RELEASE FONT oFont
Return nil
//----------------------------------------------------------------------------//
Thank you.
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
Stay tuned adordd its ready and Ill post new version later today.
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Adordd its ready to work at https://github.com/AHFERREIRA/adordd.git
It has been in development since Feb 2015 and being tested on real application working in parallel with the actual application with ADS and passed all trials.
This app with adordd its now being tested intensive on concurrent access to check locking scheme and exclusive use.
Will report results end next week.
With adordd you can migrate immediately to any SQL server although all the trials have been made only with ADS, MySql and MS Access.
No change code required. Except:
1) As with ADS in index expressions you have to evaluate vars before send it to adordd.
2) Delete records are immediately removed from table and cant be recovered again. So code like:
Thats it!
But you can do much more:
True locks as any other rdd.
Upload tables to any Sql server just like:
Performance its quite good.
No Sql knowledge needed unless you want to use and run sql statements directly from ado functions.
You write code exactly the same as any other rdd.
With adordd we are free from all kind of limitations with tables and index management already in actual and future operating systems and will extend the life of our applications further.
Although ADO it already today an "old" framework I think it will stay around for the next coming years (I hope so)
Ill give support to it as long as you can supply precise ideas and sample code where something has not been foreseen in adordd scope of action.
I hope that it will do the job for you all as it does for me.
It has been in development since Feb 2015 and being tested on real application working in parallel with the actual application with ADS and passed all trials.
This app with adordd its now being tested intensive on concurrent access to check locking scheme and exclusive use.
Will report results end next week.
With adordd you can migrate immediately to any SQL server although all the trials have been made only with ADS, MySql and MS Access.
No change code required. Except:
1) As with ADS in index expressions you have to evaluate vars before send it to adordd.
2) Delete records are immediately removed from table and cant be recovered again. So code like:
Code: Select all
Delete record recno
BlankRec() //this will not work either comment it or place it before delete.
delete all //this will not work take it from here
while....
if lcondition //change condition to not
recall record //delete each record here
endif
end
But you can do much more:
Code: Select all
hb_GetAdoConnection():Execute("CREATE VIEW cView ....")
sele 0
use cView
Browse()
Upload tables to any Sql server just like:
Code: Select all
use table VIA "DBFCDX"
copy to sqltable via "ADORDD"
No Sql knowledge needed unless you want to use and run sql statements directly from ado functions.
You write code exactly the same as any other rdd.
With adordd we are free from all kind of limitations with tables and index management already in actual and future operating systems and will extend the life of our applications further.
Although ADO it already today an "old" framework I think it will stay around for the next coming years (I hope so)
Ill give support to it as long as you can supply precise ideas and sample code where something has not been foreseen in adordd scope of action.
I hope that it will do the job for you all as it does for me.
Regards
Antonio H Ferreira
Antonio H Ferreira
Re: ADO RDD xHarbour
Antonio, at this place on line 5348 the rdd should not be hardcoded!
should be
Code: Select all
IF !FILE(cTable)
DBCREATE(cTable,;
{ {"CODLOCK","C",50,0 }},;
"DBFCDX",.T.,"TLOCKS")
INDEX ON CODLOCK TO (cIndex)
ENDIF
Code: Select all
IF !FILE(cTable)
DBCREATE(cTable,;
{ {"CODLOCK","C",50,0 }},;
rRdd,.T.,"TLOCKS")
INDEX ON CODLOCK TO (cIndex)
ENDIF