Home » Developer & Programmer » Forms » set the value of variable with parameter (form 6)
set the value of variable with parameter [message #571419] Sun, 25 November 2012 19:29 Go to next message
bogor
Messages: 2
Registered: November 2012
Junior Member
Anybody can show me, how to set the value of variable with parameter like below?

example :

I want the value of these variables define like below
var1 := 1;
var2 := 2;
var3 := 3;

FOR j IN 1 .. 3
LOOP
var||j := j;
end loop;

error of the syntax is ... bad bind variable 'var'
how to interpret variable var1 from var||j.

Thanks for the answers
Re: set the value of variable with parameter [message #571436 is a reply to message #571419] Mon, 26 November 2012 00:17 Go to previous messageGo to next message
ranamirfan
Messages: 535
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Quote:

Error of the Syntax is ... bad bind variable 'var'.


Declare your variable Var with Data type ( Date / Number / Varchar2 ).
Please read below link it'll help you for declaration of variables.

http://www.zentut.com/plsql-tutorial/plsql-variables/

Regards,
Irfan
Re: set the value of variable with parameter [message #571439 is a reply to message #571436] Mon, 26 November 2012 00:43 Go to previous messageGo to next message
bogor
Messages: 2
Registered: November 2012
Junior Member
The variable Var has been define at first. the scenario is I want to define that
the column block var1 := 1, var2 := 2 and var3 := 3. the value 1,2 and 3 from loop counter
FOR j IN 1 .. 3
LOOP
var||j := j;
end loop;

So column block var1 := 1, column block var2 := 2, column block var3 := 3.
I've try with name_in(var||j) := 1 but it was not work;

The idea is how to define the value of Var1 = 1, Var2 = 2 and Var3 = 3 where the name variable Var1 from text 'var'||j
Re: set the value of variable with parameter [message #571590 is a reply to message #571439] Tue, 27 November 2012 08:12 Go to previous message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
You can't reference local variables dynamically.
Previous Topic: Custom HTML login page for forms
Next Topic: Adding a Save (Update) button
Goto Forum:
  


Current Time: Wed Jul 03 11:27:03 CDT 2024