elvira wrote:Thank you very much.
And what is the equivalent please for:
SUM FIELD->TOTAL TO nt
Thanks.
SELECT SUM( Total ) AS nt FROM MyTable WHERE MyCondition
? oRs:Fields( "nt" ):Value
elvira wrote:Thank you Enrico.
One little question more, as now we don´t have to do PACK o Reindex, is there any command via SQL sentence to issue from time to time to optimize the database?:
Kind regards
LOCAL cCn1 := "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=MyDatabase.mdb"
LOCAL cCn2 := "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=MyCompactedDatabase.mdb"
LOCAL oJro
oJro = CREATEOBJECT( "JRO.JetEngine" )
oJro:CompactDatabase( cCn1, cCn2 )
elvira wrote:Mr. Enrico,
Thank you a lot.
elvira wrote:Appart from w3schools, is there a book preferent to learn ADO?. For example, the compact of database is not explanied at that site.
elvira wrote:Also, Microsoft.Jet.OLEDB.4 works in Windows 8?.
Also, Microsoft.Jet.OLEDB.4 works in Windows 8?.
Is xBrowse works with array of TDataRow?
elvira wrote:Hello,
When the table is empty in ADO, operations such as oRs:AbsolutePosition block the program instead of giving an error.
Other commands, such as oRs:Movefirst() do produce an error.log.
In DBF for example in a database with no records, you could issue dbgotop() or dbgobottom() with no problems, but oRs:Movefirst() fails.
Is there a way in ADO that they don´t produce such behaviour and work as DBF in an empty table?.
Thanks!
elvira wrote:Enrico, thank you.
So I have to use many try/catch, but won´t be too slow for the application performance?.
Thankls
//--------------------------
Function TtoDate( tDate )
If empty( tDate)
Return( ctod("00/00/00"))
Endif
If ValType( tDate ) = "D"
Return(tDate )
Endif
Return( stod( substr( ttos( tDate ), 1, 8 ) ))
dDob := If( empty(oRsPet:Fields("Dob"):Value), ctod("00/00/00"),;
TtoDate(oRsPet:Fields("Dob"):Value))
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: karinha, nageswaragunupudi and 105 guests