Hi,
i have problem to port my VO app to XS. I have code like this:
Method Init()
bB := bBrowser{...}
bB:ServerType := #SQL
bB:Use(SELF:Server, ...)
bCD := bDataColumn{bB, SELF:Server, {|Server| myFunction(Server)}, #Expression}
...
bB:AddColumn(bCD)
bB:OpenColumn(bCD, 1)
...
return
function myFunction(Server) as string
local sRet as string
local oCmd as AdoCommand
local oRS as AdoRecordSet
sRet := null_string
oCmd := AdoCommand{}
oCmd:ActiveConnection := oConn
oCmd:CommandText := "select * from table1 where id = " + NTrim(Server:FieldGet(#ID))
oCmd:CommandType := AdCmdText
oRS := oCmd:Execute(REF NIL, NIL,NIL)
IF oRS:RecordCount > 0
oRS:MoveFirst()
WHILE !oRS:EOF
IF !Empty(sRet)
sRet += CRLF
ENDIF
sRet += oRS:FieldGet(#Info)
oRS:MoveNext()
ENDDO
ENDIF
return sRet
If there are few lines in Server, the application sometimes works. When there are more rows, the application always crashes on the line oCmd := AdoCommand{} with error "Bound Error". Does this look like a memory allocation problem?
The code is generally more complicated, but the idea is the same as above.
Regards,
Jacek
Xs2Ado and bBrowser problem
Re: Xs2Ado and bBrowser problem
Jacek,
Try adding an oRs:Close() to your function.
Robert
Try adding an oRs:Close() to your function.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Re: Xs2Ado and bBrowser problem
Robert,
thank you for your answer, but unfortunately it doesn't help.
thank you for your answer, but unfortunately it doesn't help.
Re: Xs2Ado and bBrowser problem
Jacek,
Can you create a small example that demonstrates the problem?
Robert
Can you create a small example that demonstrates the problem?
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Re: Xs2Ado and bBrowser problem
Robert,
I will try, but it will be a bit difficult because I am using a storage procedure to display the value in a cell. This procedure has 10 output parameters. In fact, I think these parameters may cause a memory leak or something like that.
Jacek
I will try, but it will be a bit difficult because I am using a storage procedure to display the value in a cell. This procedure has 10 output parameters. In fact, I think these parameters may cause a memory leak or something like that.
Jacek
Re: Xs2Ado and bBrowser problem
Jacek,
Please try to create an example.
Often creating a small example helps you to find why the code fails.
Robert
Please try to create an example.
Often creating a small example helps you to find why the code fails.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu

