Hello, Everyone.
I have a variable that I am setting from a recordset.
It is going out of scope after I close the recordset, and I don't understand why.
I am setting a variable to the recordset value in order to avoid just this situation. Why would the variable go out of scope? Is java not strongly typed? It seems to be setting the variable as a reference.
This is the output.
Is there a different declaration to force 'by value'?
I have a variable that I am setting from a recordset.
It is going out of scope after I close the recordset, and I don't understand why.
I am setting a variable to the recordset value in order to avoid just this situation. Why would the variable go out of scope? Is java not strongly typed? It seems to be setting the variable as a reference.
Code:
var bill=icurs("billto")
Write("<br>" + icurs("billto") +"<br>")
Write("<br>" + bill +"<br>")
Write("<br>1 Hello<br>")
Write("<br>" + bill +"<br>")
Write("<br>1 Goodbye<br>")
icurs.close()
Write("<br>2 Hello<br>")
Write("<br>" + bill +"<br>")
Write("<br>2 Goodbye<br>")
This is the output.
Code:
ABC
ABC
1 Hello
ABC
1 Goodbye
2 Hello
2 Goodbye
Is there a different declaration to force 'by value'?