Is possible rowset and lreadonly works the same time?
Like this:
- Code: Select all Expand view RUN
- oRs := oCn:RowSet( <table>, nRows,.T. )
Regards.
oRs := oCn:RowSet( <table>, nRows,.T. )
function Test()
local oRs, cTable,oCn
local oWnd, oBrw, oFont
oCn := maria_Connect( "209.250.245.152,fwh,fwhuser,FiveTech@2022" )
if oCn <> NIL
? "Conected"
endif
oRs := oCn:RowSet( "select * from custx where state = ? ",{ 'NY' },500,.T. )
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-14
DEFINE WINDOW oWnd
oWnd:SetFont( oFont )
@ 0,0 XBROWSE oBrw OF oWnd ;
DATASOURCE oRs AUTOCOLS ;
CELL LINES FOOTERS NOBORDER
WITH OBJECT oBrw
:bRecSeldata := { || oBrw:KeyNo }
:nRecSelWidth := "999,999"
:bRecSelFooter := { || oBrw:nLen }
:CreateFromCode()
END
oWnd:oClient := oBrw
DEFINE TIMER oTimer INTERVAL 1000 ACTION __ReadMore( oBrw ) OF oWnd
ACTIVATE WINDOW oWnd CENTERED ;
ON INIT ( oTimer:Activate() )
RELEASE FONT oFont
oTimer:DeActivate()
oTimer:End()
oCn:Close()
return nil
func __ReadMore( oBrw )
local cMsg
if ! PeekMessage( @cMsg, oBrw:hWnd, 0x100, 0x109, 0 )
WITH OBJECT oBrw
if :oDbf:lMore
:oDbf:ReadNext( 5555 )
:GoBottom()
:Refresh()
else
oTimer:DeActivate()
endif
END
endif
return nil
Código : 1
Descrição do Erro:
Erro BASE/1070 Erro nos parƒmetros: ==
Código: 1
Detalhamento:
------------
Arg. 1 Tipo: O Valor: FWMARIACONNECTION
Arg. 2 Tipo: L Valor: .T.
Chamada de Pilha
================
Chamado de FWMARIAROWSET:NEW(1580)
Chamado de FWMARIACONNECTION:EXECUTE_SQL(6837)
Chamado de FWMARIACONNECTION:ROWSET(7549)
Chamado de MARIANEWRECORD(202)
oRs := oCn:RowSet( "select * from custx where state = ? ",{ 'NY' },500,.T. )
oRs := oCn:RowSet( "select * from custx where state = 'NY' ",500,.T. )
oRs := oCn:RowSet( "select * from custx where state = ? LIMIT ? ",{ "NY", 500}, .T. )
Application
===========
Path and name: D:\Softway\ProjetosWanderson\EsocialSQL\sinwin.EXE (32 bits)
Size: ********* bytes
Compiler version: xHarbour 1.3.0 Intl. (SimpLex) (Build 20231104)
FiveWin version: FWH 23.10
C compiler version: Borland/Embarcadero C++ 7.7 (32-bit)
Windows 11 64 Bits, version: 6.2, Build 9200
Time from start: 0 hours 0 mins 18 secs
Error occurred at: 01/06/2024, 09:48:42
Error description: Error BASE/1070 Erro nos parƒmetros: ==
Args:
[ 1] = O FWMARIACONNECTION
[ 2] = L .T.
Stack Calls
===========
Called from: .\source\internal\FWMARIA.PRG => FWMARIAROWSET:NEW( 1580 )
Called from: .\source\internal\FWMARIA.PRG => FWMARIACONNECTION:EXECUTE_SQL( 6837 )
Called from: .\source\internal\FWMARIA.PRG => FWMARIACONNECTION:ROWSET( 7549 )
Called from: D:\Softway\ProjetosWanderson\EsocialSQL\PRGh\funcao32.prg => MARIANEWRECORD( 202 )
#include "fivewin.ch"
function Main()
local oCn := maria_Connect( "208.91.198.197:3306,fwhdemo,gnraofwh,Bharat@1950", .t. )
local oRs
MsgRun( "Reading RowSet", "CUSTX", { || ;
oRs := oCn:RowSet( "select * from custx where state = ? order by id", { "NY" }, 30, .T. ) } )
XBROWSER oRs SHOW RECID TITLE FWVERSION
oRs:Close()
oCn:Close()
return nil
#include "fivewin.ch"
function Main()
local oCn := maria_Connect( "208.91.198.197:3306,fwhdemo,gnraofwh,Bharat@1950", .t. )
local oRs
MsgRun( "Reading RowSet", "CUSTX", { || ;
oRs := oCn:RowSet( "select * from custx where state = ? order by id", { "NY" }, 30, .T. ) } )
XBROWSER oRs SHOW RECID TITLE FWVERSION
oRs:Close()
oCn:Close()
return nil
But using xHarbour results an error:
But ok, I will tray other way to handle my large databases.
#include "fivewin.ch"
function Main()
local oCn := maria_Connect( "208.91.198.197:3306,fwhdemo,gnraofwh,Bharat@1950", .t. )
local oRs
? "reading custbig"
oRs := oCn:RecSet( "custbig", -100 )
XBROWSER oRs SHOW RECID TITLE FWVERSION
oRs:Close()
oCn:Close()
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 49 guests