#include "fivewin.ch"
#include "xbrowse.ch"
function Main()
local oWnd
oConexion := mysql_Connect( { "localhost", "rovigo", "root", "1223", "3306" } )
If oConexion == nil
msginfo("error base de datos")
return(.f.)
EndIf
oRcs := oConexion:Query("Select CodCli,NomCli From Clientes") //cada vez que se abre la tabla aumenta la memoria y cualquier tabla
If oRcs==Nil
msginfo("error tabla")
Return(.f.)
EndIf
Aprovechando quisiera saber si se puede pasar por alto el mensaje de dialogo cuando al abrir una base de datos no está
mysql_Connect()
En el caso de oCn:Query("Select * from tabla",.f.) con .f. no lo muestra se puede de alguna manera para una base de datos con mysql_Connect()
Antonio Linares wrote:Luis,
Has probado con ?
oRcs:End()
y
oRc := nil
I modified the libs.
1) If the last parameter of mysql_connect(...) is .F., display of error is suppressed. The actual number of parameter is not important. It should be the last paramter.
He can read more about its usage in the whatsnew.txt of FWH16.11
2) In the example he posted, he specified 5th param as "3306". Port 3306 is default and better it is omitted. If he still wants to specify the port, it should be NUMERIC not Charactger.
MEMORY:
When a RowSet is closed, the freed memory is not surrendered by Harbour to the OS, but still kept as free memory by Harbour. When another recordset is opened, the same memory heap is used by Harbour
Standby
The Standby list, which is shown in blue, contains pages that have been removed from process working sets but are still linked to their respective working sets. As such, Standby list is essentially a cache. However, memory pages in the Standby list are prioritized in a range of 0-7, with 7 being the highest. Essentially, a page related to a high-priority process will receive a high-priority level in the Standby list.
For example, processes that are Shareable will be a high priority and pages associated with these Shareable processes will have the highest priority in the Standby list.
Now, if a process needs a page that is associated with the process and that page is now in the Standby list, the memory manager immediately returns the page to that process' working set. However, all pages on the Standby list are available for memory allocation requests from any process. When a process requests additional memory and there is not enough memory in the Free list, the memory manager checks the page's priority and will take a page with a low priority from the Standby list, initialize it, and allocate it to that process.
Standby: Pages of physical ram not actively being used. These are still left in physical ram but will be repurposed first by the memory manager (either returned to the active list or zeroed out and reused) if something needs physical ram for active pages. Standby pages are essentially cache – it’s better to have infrequently used data kept in RAM “just in case” than pushing it out to disk when the memory isn’t needed for anything else.
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Google [Bot] and 110 guests