Home » Developer & Programmer » Forms » Open Notepad or Excel file from Form 6i automatically and ref cursor (merged)
Open Notepad or Excel file from Form 6i automatically and ref cursor (merged) [message #215598] Tue, 23 January 2007 01:54 Go to next message
shakti_goyal
Messages: 60
Registered: November 2006
Location: India
Member

I have create a package which contain a single variable refcursor...
I create a stored procedure to assign two queries to it.....


I want to call these cursor variable and stored procedure in a procedure of Form............

But i could't get success......
I m using Form 6i


Thanks in advance
Shakti
Re: ref cursor [message #215769 is a reply to message #215598] Tue, 23 January 2007 18:41 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Try defining a table with the definition in the refcursor and then use that new table name with the '%ROW' construct.

David
Re: ref cursor [message #215851 is a reply to message #215598] Wed, 24 January 2007 01:40 Go to previous messageGo to next message
shakti_goyal
Messages: 60
Registered: November 2006
Location: India
Member



Thanks for reply.........

I could't understand properly.......

Can u give me some more explanations with examples.......


Regards

Shakti
Re: ref cursor [message #216079 is a reply to message #215851] Wed, 24 January 2007 23:15 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
You want a data type that comprises a number of items. Define a table with a structure that has those items in it and them use the table_name$row construct to handle it.

David
Re: ref cursor [message #216688 is a reply to message #216079] Mon, 29 January 2007 22:32 Go to previous messageGo to next message
shakti_goyal
Messages: 60
Registered: November 2006
Location: India
Member

can u PLz send me sample code........

Regards
Shakti
Re: ref cursor [message #217150 is a reply to message #216688] Wed, 31 January 2007 18:48 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Instead of having
CREATE OR REPLACE
TYPE       NEWOBJECT1 AS OBJECT
(
  NEWATTRIB1 VARCHAR2(10),
  NEWATTRIB2 VARCHAR2(10),
  NEWATTRIB3 VARCHAR2(10)
)
/
and
CREATE TABLE NEWOBJECT1_T OF NEWOBJECT1;

Use
CREATE TABLE NEWOBJECT1_T2 
(
  NEWATTRIB1 VARCHAR2(10),
  NEWATTRIB2 VARCHAR2(10),
  NEWATTRIB3 VARCHAR2(10)
)
/
and then use NEWOBJECT1_T2%ROW for your passed definition.

David
Re: ref cursor [message #217888 is a reply to message #217150] Tue, 06 February 2007 00:01 Go to previous messageGo to next message
shakti_goyal
Messages: 60
Registered: November 2006
Location: India
Member



Thanks friend.......

For giving ur precious time to me .......
It works for me.......

My another Question is that........

I m using Form 6i... I pass some variale from form and call a
procedure that is stored inside this form........

now i have open a cursor retrive some record on the bases of variable thta i have passed..........

Now I want that each record should be print in a file,
for this purpose i am using text_io pacakge and send data in a file as .txt format........

It is ok........ i close the form and open the file at specified location.......
-------------------------
Now i want that when i click the button on form .txt file should be open automatically.........

I m using Host built in , and it is work for me that means it open my file in dos mode........

while i want when this file is open , Notepad should be open...

or

Further if i use .csv or .xls format

Excel should be open automatically........


Plz give me suggession ........

It's urgent........

Thanks in advance

Regards
Shakti Goyal







Open Notepad or Excel file from Form 6i automatically [message #217890 is a reply to message #215598] Tue, 06 February 2007 00:04 Go to previous messageGo to next message
shakti_goyal
Messages: 60
Registered: November 2006
Location: India
Member

Hello all,

I m using Form 6i... I pass some variale from form and call a
procedure that is stored inside this form........

now i have open a cursor retrive some record on the bases of variable thta i have passed..........

Now I want that each record should be print in a file,
for this purpose i am using text_io pacakge and send data in a file as .txt format........

It is ok........ i close the form and open the file at specified location.......
-------------------------
Now i want that when i click the button on form .txt file should be open automatically.........

I m using Host built in , and it is work for me that means it open my file in dos mode........

while i want when this file is open , Notepad should be open...

or

Further if i use .csv or .xls format

Excel should be open automatically........

I m using windows 98 on my PC


Plz give me suggession ........

It's urgent........

Thanks in advance

Regards
Shakti Goyal



Re: ref cursor [message #217971 is a reply to message #217888] Tue, 06 February 2007 04:37 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please review the threads in this forum that contain the 'host' command. EITHER, instead of just opening the '.txt' file, issue a 'host' command that mentions both 'notepad' and the '.txt' file name, OR using the 'windows explorer' associate 'notepad' with '.txt' and 'Excel' with '.csv'.

David
Re: ref cursor [message #217973 is a reply to message #217971] Tue, 06 February 2007 04:40 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
DON'T POST THE SAME QUESTION TWICE!!! And please stop putting each phrase in a separate paragraph. IT IS VERY HARD TO READ QUICKLY!!!

David
Re: ref cursor [message #218016 is a reply to message #217973] Tue, 06 February 2007 07:01 Go to previous messageGo to next message
shakti_goyal
Messages: 60
Registered: November 2006
Location: India
Member


Thanks for ur Quick reply
Sorry David , It was my mistake........
I use Host command simply passing string edit 'Filename.txt'
so that File is open in Dos mod.......
But when I use 'Notepad'||' Filename.txt' ,File is not open in Notepad.....While this command is execute in my OS very well.....
I m using Windows 98.....
I want to open File in Notepad ........

Thanks in advance

Regards
Shakti
Re: ref cursor [message #218102 is a reply to message #218016] Tue, 06 February 2007 18:40 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please search this forum for 'notepad host' there are threads with working examples.

David
Re: ref cursor [message #218896 is a reply to message #218102] Sun, 11 February 2007 23:16 Go to previous message
shakti_goyal
Messages: 60
Registered: November 2006
Location: India
Member


Hello David,
I gave full path of Notepad.exe and the file name now it is working for me.

Thanks
Previous Topic: progress bar in splash screen.
Next Topic: Problem in open Template Form
Goto Forum:
  


Current Time: Sat Feb 08 19:26:36 CST 2025