Convert form 6i to 10g [message #207684] |
Wed, 06 December 2006 10:37 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
rgobatti
Messages: 7 Registered: December 2006 Location: SAKATA Seed Sudamerica
|
Junior Member |
|
|
I have a program that was developed in Forms 6i.
Actually, this program:
- reads a table with a Blob column that contains a MS Word format Document.
- the document needs to be convert , then the program changes some variables that are wildcards.
In forms 6i I use a column with datatype Ole and the flowing procedure that read value from database:
PROCEDURE Pr_Abre_Contrato (pContrato In Contrato.Cont_Numero%Type,
pQuery in Varchar2 ) Is
Workbook OLE2.OBJ_TYPE;
Application OLE2.OBJ_TYPE;
MyDocuments ole2.obj_type;
Args ole2.obj_type;
vWhere Varchar2(200);
BEGIN
If pQuery = 'S' Then
Go_Block('PRD_VARCONT_VALORES');
Clear_Block(No_Validate);
vWhere := ' CONT_NUMERO = '||pContrato;
Set_Block_Property('PRD_VARCONT_VALORES',Default_Where,vWhere);
Execute_Query;
End if;
--
Forms_OLE.Exec_Verb('PRD_VARCONT_VALORES.MCO_MODELO',1);
Workbook := forms_ole.get_interface_pointer('PRD_VARCONT_VALORES.MCO_MODELO');
Application := ole2.get_obj_property(workbook,'Application');
OLE2.set_property(Application,'Visible','True');
--
OLE2.RELEASE_OBJ(workbook);
OLE2.RELEASE_OBJ(application);
--
END;
To change the values I use:
To open the Document:
PROCEDURE Pr_Abre_Documento ( Workbook In Out OLE2.OBJ_TYPE,
Application In Out OLE2.OBJ_TYPE ) Is
BEGIN
Forms_OLE.Exec_Verb('PRD_VARCONT_VALORES.MCO_MODELO',1);
Workbook := forms_ole.get_interface_pointer('PRD_VARCONT_VALORES.MCO_MODELO');
Application := ole2.get_obj_property(workbook,'Application');
ole2.set_property(application,'visible','False');
END;
To replace the wildcards:
hSelection OLE2.OBJ_TYPE;
hFind OLE2.OBJ_TYPE;
hArgs OLE2.LIST_TYPE;
BEGIN
hSelection := OLE2.GET_OBJ_PROPERTY(Application,'Selection');
-- Now get the "Find" object from the selection
hFind := OLE2.GET_OBJ_PROPERTY(hSelection,'Find');
-- Now we can call the execute method to do the search/replace
hArgs := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(hArgs,TargetText); /* FindText */
OLE2.ADD_ARG(hArgs,TRUE); /* MatchCase */
OLE2.ADD_ARG(hArgs,TRUE); /* MatchWholeWord */
OLE2.ADD_ARG(hArgs,FALSE); /* MatchWildCards */
OLE2.ADD_ARG(hArgs,FALSE); /* MatchSoundsLike */
OLE2.ADD_ARG(hArgs,FALSE); /* MatchAllWordForms */
OLE2.ADD_ARG(hArgs,TRUE); /* Forward */
OLE2.ADD_ARG(hArgs,0); /* Wrap wdFindAsk=2, wbFindContinue=1, wdFindStop=0 */
OLE2.ADD_ARG(hArgs,FALSE); /* Format */
OLE2.ADD_ARG(hArgs,ReplaceWithText); /* ReplaceWith */
OLE2.ADD_ARG(hArgs,2); /* Replace wdReplaceAll=2, wdReplaceOne=1, wbReplaceNone=0 */
OLE2.INVOKE(hFind,'Execute',hArgs);
OLE2.DESTROY_ARGLIST(hArgs);
-- Clean Up
OLE2.RELEASE_OBJ(hFind);
OLE2.RELEASE_OBJ(hSelection);
--OLE2.RELEASE_OBJ(Application);
END;
Now, I need to convert this program to forms10g. I opened the TAR in metalink and the Support said that
exec_verb can not be used and it doesn't have another one to replace.
Does anybody have an idea?
[Updated on: Wed, 06 December 2006 18:14] by Moderator Report message to a moderator
|
|
|
|
Re: Convert form 6i to 10g [message #208648 is a reply to message #207684] |
Mon, 11 December 2006 13:27 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
rgobatti
Messages: 7 Registered: December 2006 Location: SAKATA Seed Sudamerica
|
Junior Member |
|
|
David,
I Tried use the solution, but not working, neither compile
using the solution shown. Do I need to configure some other thing?
The bigger different between my solution and the shown, that I read word document from table.
The document 190252.1 read a word file from local drive.
Thanks,
|
|
|
|
|
|
Re: Convert form 6i to 10g [message #209103 is a reply to message #208991] |
Wed, 13 December 2006 05:54 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
rgobatti
Messages: 7 Registered: December 2006 Location: SAKATA Seed Sudamerica
|
Junior Member |
|
|
David,
I got the library with a member this forum.
I have another doubt now: I receive a olextra.pll e olextra.dll and a form test olextra.fmb. When I compile this program shown the error Activate_Server not exists. I don't know how I associate a .ddl with forms.
Thanks your help.
|
|
|
|
Re: Convert form 6i to 10g [message #209318 is a reply to message #209238] |
Thu, 14 December 2006 04:47 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
rgobatti
Messages: 7 Registered: December 2006 Location: SAKATA Seed Sudamerica
|
Junior Member |
|
|
David,
I discover what is happening. Activate_Server is a built-in that working in forms 6i. My problem is I'm using forms10g, where this built-in does not valid.
Will be that exist something to form10g ?
Can I construt a built-in to 10g ? How ?
|
|
|
|
|
|
|
|
|
|
Re: Convert form 6i to 10g [message #341526 is a reply to message #341509] |
Tue, 19 August 2008 04:00 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
asgharian
Messages: 6 Registered: August 2008
|
Junior Member |
|
|
hi
I Want To Save Ole To File In Form6i, I Think With OLEXTRA Lib
I Can , So Search This But Can' t Found in Fourm Reference
if you know where Can I Found this library please help me .
thanks
|
|
|
|
|
|
|
|
|
|
|
|
|