Home » Developer & Programmer » Forms » DDE Package. How to close a excel file without saving changes and without messages (Forms 6i)
DDE Package. How to close a excel file without saving changes and without messages [message #431732] Thu, 19 November 2009 05:38 Go to next message
serfraile
Messages: 18
Registered: November 2009
Junior Member
Hello everybody;

I need to rescue some valors from Excel, and then close the excel file without saving changes and without messages.

I am using THe DDE package and when using

DDE.EXECUTE(convid, '[Save()]', 10000);

there is no problem, but the changes are saved.

I have tried '[Exit()]' and '[Close()]' but always have error message ORA-106555. Is there any way of donig this without errors?

Thanks in advance

Sergio.
Re: DDE Package. How to close a excel file without saving changes and without messages [message #431933 is a reply to message #431732] Fri, 20 November 2009 02:17 Go to previous messageGo to next message
serfraile
Messages: 18
Registered: November 2009
Junior Member
Can anybody help me please?

Thanks

Sergio
Re: DDE Package. How to close a excel file without saving changes and without messages [message #432035 is a reply to message #431933] Fri, 20 November 2009 10:30 Go to previous messageGo to next message
gamon
Messages: 3
Registered: November 2009
Junior Member
try:
DDE.EXECUTE(convid, '[close(false)]', 10000);

[Updated on: Fri, 20 November 2009 10:34]

Report message to a moderator

Re: DDE Package. How to close a excel file without saving changes and without messages [message #432253 is a reply to message #432035] Mon, 23 November 2009 04:43 Go to previous messageGo to next message
serfraile
Messages: 18
Registered: November 2009
Junior Member
Hi Gamon,

thanks for the reply. This statement closes the excel file, but not the excel application, and I'm still having the exception. More ideas, please?
Re: DDE Package. How to close a excel file without saving changes and without messages [message #432256 is a reply to message #432253] Mon, 23 November 2009 04:59 Go to previous messageGo to next message
gamon
Messages: 3
Registered: November 2009
Junior Member
Hi
After closing a file try to do:
DDE.EXECUTE(convid, '[quit]', 10000);

Best regards,
Bartek

[Updated on: Mon, 23 November 2009 05:00]

Report message to a moderator

Re: DDE Package. How to close a excel file without saving changes and without messages [message #432258 is a reply to message #432256] Mon, 23 November 2009 05:05 Go to previous messageGo to next message
serfraile
Messages: 18
Registered: November 2009
Junior Member
Thanks again.

Now I can close both the file an the application, but exception ORA-106552 is always in. I think I have to do a especial treatment for this exception and that's all. What do you think?

Best regards

Sergio
Re: DDE Package. How to close a excel file without saving changes and without messages [message #432261 is a reply to message #432258] Mon, 23 November 2009 05:25 Go to previous messageGo to next message
gamon
Messages: 3
Registered: November 2009
Junior Member
I've found only this:
forums.oracle.com/forums/thread.jspa?threadID=329085
and:
forums.oracle.com/forums/thread.jspa?threadID=566713

After closing excel are you doing something like this:
DDE.TERMINATE(docid);
DDE.TERMINATE(convid);
DDE.APP_END(appid);

Can you find out which dde procedure cause this exception?

Gamon
Re: DDE Package. How to close a excel file without saving changes and without messages [message #432266 is a reply to message #432261] Mon, 23 November 2009 05:38 Go to previous messageGo to next message
serfraile
Messages: 18
Registered: November 2009
Junior Member
After closing Excel I have these 3 statements you mentioned, but I think that the exception is in

DDE.EXECUTE(convid, '[Close(false)]', 10000);
DDE.EXECUTE(convid, '[Quit]', 10000);

If i wanted to save the changes and put

DDE.EXECUTE(convid, '[Save]', 10000);

the exception doesn't raise.

I'm trying to change timeout parameter to see if works, but it seems to be a bug.

I'll keep you informed asap. Please, don't forget me if you know something.

Thanks and best regards.

Sergio.
Re: DDE Package. How to close a excel file without saving changes and without messages [message #432280 is a reply to message #432261] Mon, 23 November 2009 06:53 Go to previous messageGo to next message
serfraile
Messages: 18
Registered: November 2009
Junior Member
Hi Gamon,

the exception is in statement

DDE.EXECUTE(convid, '[Quit]', 10000);

I have tried to increase the timeout but doesn't work. If I catch it , I have a new exception when doing:

DDE.TERMINATE(docid);
DDE.TERMINATE(convid);
ORA-106553

And another exception when

DDE.APP_END(appid);

ORA-106501

Any ideas?

Thanks again.

Sergio.

[Updated on: Mon, 23 November 2009 06:58]

Report message to a moderator

Re: DDE Package. How to close a excel file without saving changes and without messages [message #432740 is a reply to message #432280] Thu, 26 November 2009 00:21 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
http://www.orafaq.com/forum/m/432714/67467/?srch=DDE.TERMINATE#msg_432714 is using a 'forms_ddl' to do the 'commit'. Are you doing the same? Try using 'standard.commit'.

What happens if you 'terminate' 'convid' and then 'docid'?

David
Re: DDE Package. How to close a excel file without saving changes and without messages [message #467241 is a reply to message #432740] Fri, 23 July 2010 00:13 Go to previous messageGo to next message
azamkhan
Messages: 548
Registered: August 2005
Senior Member
hi all,

David I am facing a similar problem.

I am importing data from excel into Oracle Develper 6i Forms using DDE package. The code is working fine. The only problem is that after importing the data from excel I close the file and excel with following codes:

DDE.TERMINATE(docid);
DDE.TERMINATE(convid);
DDE.APP_END(appid);

First 2 statments should close the excel file and the excel application, right. I had run this code on some Pcs(5) having Windows Xp and Oracle Developer Forms 6i, whats happening is that only 1 of the Pc is closing the excel file and excel application, but mostly it is not working without giving any error or exception. Excel is running file on all Pcs.

Can you help me why this is happening. Why the DDE package code for exiting Excel is not working in the same manner as it should?

Azam

[Updated on: Fri, 23 July 2010 00:18]

Report message to a moderator

Re: DDE Package. How to close a excel file without saving changes and without messages [message #467899 is a reply to message #467241] Wed, 28 July 2010 03:47 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you been able to solve your problem?

David
Previous Topic: Get block name from cursor focus location
Next Topic: icon in window title bar
Goto Forum:
  


Current Time: Tue Dec 06 14:37:03 CST 2016

Total time taken to generate the page: 0.07966 seconds