• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1162
  • Last Modified:

forms v4.5- load BMP images using READ_IMAGE_FILE

this is what i want to do:
I have two buttons.

 The first one executes a query.
           execute_query;

 Then the next button  executes a series of FORMS_DDL statments.

forms_ddl ('DELETE FROM PY_SC_VACATION');
forms_ddl ('COMMIT');
forms_ddl ('read_image_file(''c:\dev2000 \step1.bmp'', ''BMP'', ''py_sc_vacation_control.image92'')');

I am trying to use the READ_IMAGE_FILE to display a BMP in the display item , called IMAGE92, in the PY_SC_VACATION_CONTROL block.

It does not work. So if anybody can shed some light on it for me as to possibly why, I would appreciate it.

Thank you
0
joekeri
Asked:
joekeri
1 Solution
 
bkmCommented:
First of all, you don't needto use form_ddl for DML statements like SELECT, DELETE etc.

Also, why do yo uhave forms_ddl for the read_image_file built in ? It's a form built-in.

0
 
joekeriAuthor Commented:
what are your suggestions there that will do what I want?
0
 
bkmCommented:
You can use
READ_IMAGE_FILE('c:\dev2000 \step1.bmp', 'BMP', 'py_sc_vacation_control.image92');

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
bkmCommented:
Also,

DELETE FROM PY_SC_VACATION;
COMMIT;

will work.
0
 
vijayakumar_vsCommented:
FORMS_DDL is used when u require to execute any DDL statements in Forms. Since u cannot execute any DDL statements directly from a front-end tool like forms, this functionality is provided. To execute any DML statements like SELECT, DELETE, INSERT and UPDATE you need not use FORMS_DDL. Also reading a BMP file also does not require FORMS_DDL. Simply u can fire the following statements

DELETE FROM PY_SC_VACATION;
COMMIT;
read_image_file('c:\dev2000\step1.bmp','BMP', py_sc_vacation_control.image92');

These statements will do!! In case if it does not work try including the BMP file path 'c:\dev2000' in the autoexec.bat file, restart the machine and try.


0
 
joekeriAuthor Commented:
this change u suggested isnot working. the first button which executes_query, does not work now.

tell me how u would have a form which uses 2 buttons.

first button executes the query

the second button does a commit and then loads a BMP into a DISPLAY ITEM defined on the form.
0
 
joekeriAuthor Commented:
this change u suggested isnot working. the first button which executes_query, does not work now.

tell me how u would have a form which uses 2 buttons.

first button executes the query

the second button does a commit and then loads a BMP into a DISPLAY ITEM defined on the form.
0
 
annu_vinayakCommented:
What seems to me is that the code for the first button is fine i.e. you can use 'execute_query' in that.

As button #2 is concerned in this case your code on that button should be like this: -


delete_record;
commit_form();
read_image_file(filename varchar, filetype varhcar, item_name varhcar);

hope this helps.
0
 
MindphaserCommented:
Please update and finalize this old, open question. Please:

1) Award points ... if you need Moderator assistance to split points, comment here with details please or advise us in Community Support with a zero point question and this question link.
2) Ask us to delete it if it has no value to you or others
3) Ask for a refund so that we can move it to our PAQ at zero points if it did not help you but may help others.

EXPERT INPUT WITH CLOSING RECOMMENDATIONS IS APPRECIATED IF ASKER DOES NOT RESPOND.

Thanks,

** Mindphaser - Community Support Moderator **

P.S.  Click your Member Profile, choose View Question History to go through all your open and locked questions to update them.
0
 
DanRollinsCommented:
Lacking timely response from joekeri or contributing experts, but seeing that there is some useful info here, I recommend:

    Refund points and save as a 0-pt PAQ.

DanRollins -- EE database cleanup volunteer
0
 
MoondancerCommented:
Thanks, Dan.
I finalized this today and will monitor it in the event an adjustment is needed.
50 points refunded, question moved to our PAQ at zero points and closed.
Moondancer - EE Moderator
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now