Home » Developer & Programmer » Forms » ORA-01036: illegal variable name/number (Forms [32 Bit] Version 10.1.2.0.2 (Production))
ORA-01036: illegal variable name/number [message #603616] Wed, 18 December 2013 00:37 Go to next message
deepakmannazhi
Messages: 128
Registered: February 2010
Location: Dubai, UAE
Senior Member

Hai All,

I'm trying to upload images, based on one parameter it will upload to server or database.

IMG is a BLOB column (Database Item).

Now the there is no values assigned to IMG (Image will upload to server).

But when we save it is showing Quote:
ORA-01036: illegal variable name/number


I have googled, and saw one solution
It was asking to set the blocks Update Changed columns only property to 'NO'.

I did the same(it was like that only)

Still the error is coming.

please be noticed, the error is not showing always.


Please find the attched screenshot too.

Can anybody please suggest a solution

Thanks
Deepak
  • Attachment: error.png
    (Size: 32.58KB, Downloaded 78 times)
Re: ORA-01036: illegal variable name/number [message #603634 is a reply to message #603616] Wed, 18 December 2013 02:11 Go to previous messageGo to next message
deepakmannazhi
Messages: 128
Registered: February 2010
Location: Dubai, UAE
Senior Member

Dear All,

Do I need to clarify anything
Re: ORA-01036: illegal variable name/number [message #603651 is a reply to message #603634] Wed, 18 December 2013 03:50 Go to previous messageGo to next message
Littlefoot
Messages: 19350
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I guess you already checked what that error means:
Oracle

ORA-01036: illegal variable name/number

Cause: Unable to find bind context on user side

Action: Make sure that the variable being bound is in the sql statement.

However, this:you
the error is not showing always
is bad news - you'll have to find out why it happens only sometimes and not always.

Reviewing error message you posted, the INSERT statement itself looks strange:
insert into ehs_images) values) returning ...

Two open brackets (both on questionable places), none of them closed. I don't know whether it is Oracle processing that did that, or is it piece of code you've written.
Re: ORA-01036: illegal variable name/number [message #603653 is a reply to message #603651] Wed, 18 December 2013 04:04 Go to previous messageGo to next message
cookiemonster
Messages: 10860
Registered: September 2008
Location: Rainy Manchester
Senior Member
I believe that's a forms generated insert. From memory I believe that hand written dml would never be displayed in that particular box.

@deepakmannazhi - I suggest you trace the forms DB session and check the insert being submitted to the DB, because as LF says, what's in that image looks wrong.
Re: ORA-01036: illegal variable name/number [message #603654 is a reply to message #603651] Wed, 18 December 2013 04:05 Go to previous messageGo to next message
deepakmannazhi
Messages: 128
Registered: February 2010
Location: Dubai, UAE
Senior Member

Dear LittleFoot,cookiemonster

Thanks,

That error message is auto generated.

As usual we doing 'COMMIT_FORM' only.

The error is coming when the BLOB field is null.

[Updated on: Wed, 18 December 2013 04:07]

Report message to a moderator

Re: ORA-01036: illegal variable name/number [message #603667 is a reply to message #603654] Wed, 18 December 2013 05:26 Go to previous messageGo to next message
deepakmannazhi
Messages: 128
Registered: February 2010
Location: Dubai, UAE
Senior Member

Hai, I have seen the same issue is posted by someone else, in different Forums.
But no one is having a resullt.

Re: ORA-01036: illegal variable name/number [message #603677 is a reply to message #603667] Wed, 18 December 2013 06:25 Go to previous messageGo to next message
Littlefoot
Messages: 19350
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
So, if your form works OK when you store image into a table but fails if you store it onto a server (file system, right?), then try to insert a BLOB every time:
  • store image (if you choose that option)
  • store empty BLOB (use EMPTY_BLOB()) (if file goes to a server
Re: ORA-01036: illegal variable name/number [message #603692 is a reply to message #603677] Wed, 18 December 2013 08:50 Go to previous messageGo to next message
deepakmannazhi
Messages: 128
Registered: February 2010
Location: Dubai, UAE
Senior Member

Hai Littilefoot, Sorry, I will check tomorrow I don't have the form with me.

could you please guide me, how to assign EMPTY_BLOB() to a BLOB field from Forms Builder. I have tried Assignment, copy, those are not working.

I will copy paste the code tomorrow.
Re: ORA-01036: illegal variable name/number [message #603727 is a reply to message #603692] Wed, 18 December 2013 22:50 Go to previous messageGo to next message
deepakmannazhi
Messages: 128
Registered: February 2010
Location: Dubai, UAE
Senior Member

Hai LittleFoot,cookiemonster

The Issue s solved. Cool

Since I didn't get any method to Assing values to BLOB field from Forms Builder, I Did it through back end trigger.

Both cases it will read image

read_image_file(:GLOBAL.LOCAL_ATTACH_FILE,'JPG','EHS_IMAGES.IMG');  


But If it is to server, we will assign EMPTY_BLOB() to Image field

CREATE OR REPLACE TRIGGER SCHEMA."TRIG" BEFORE INSERT OR UPDATE ON  SCHEMA.IMG_TAB FOR EACH ROW
BEGIN
  if inserting and :new.FILE_NAME is NOT null then
        :new.IMG := EMPTY_BLOB();
    end if;
END;


Please guide me ,if anything else to be noticed.

Thanks a lot for your Help

Regards
Deepak
Re: ORA-01036: illegal variable name/number [message #604892 is a reply to message #603727] Sun, 05 January 2014 11:18 Go to previous message
deepakmannazhi
Messages: 128
Registered: February 2010
Location: Dubai, UAE
Senior Member

Dear All,

We can easily solve the above issue by setting Block's Quote:
DML Returning Value Property
to YES, so no need to write back end trigger.

More Details about Quote:
DML Returning Value Property
is available in forms builder online help.


Thanks and Regards
Deepak
Previous Topic: How to create to do list form using Oracle Form 6i
Next Topic: Any disadvantage of using EXEC_SQL in forms
Goto Forum:
  


Current Time: Fri Aug 01 18:51:36 CDT 2014

Total time taken to generate the page: 0.09295 seconds