Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create table while installing module

Status
Not open for further replies.

dhavalbakhda

Programmer
Apr 4, 2012
24
IN
Hi,

How i can create the table into the database while installing custom module.

Any help appreciated



Thanks
Dhaval
 
The module developers guide actually has a writeup on how to do it and we all used to do it like that.Of late the advise has been to let the module install and then allow a administrator to create the tables form admin.index.It is preferred that way because when you uninstall you do not want the uninstall to destroy your table.Either you can follow the module developers guide which when installing/uninstalling will take care of schema business or if you want your module to be a little better use the method I describe.The easiest way to do this is by looking at a module that does this.For e.g do you have OI(Object Importer) in your install,if so you can see/trace how he does it in that module.At where I work since we have so many modules that install schema we thought about it for a while created a subsystem(framework) so that to do anything table related it is very easy.that will be overkill for a single module to install schema but have that thought as well.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
here's a 9.7.1 module that I wrote to show another friend
perhaps it will make sense if you can see it


Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
thanks appnair for reply

the link i am not able to access.

its coming [You are not allowed to perform this action.]
 
well here is a download link

I have permissions for users so not sure why you cannot access it

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Creation of Database tables ( OpenText Best Practice and preferred method.) is best avoided via the install process. Open Text consultants use the method of a special section for the module on the Admin pages to create and drop the tables manually. this way, data is preserved when un-installing the module and install issues in a cluster are avoided.

 
As I said in my earlier post none of the people who do oscript for a living do the way the stuff is taught.We all allow the DB install/uninstall as a
administrative chore.As Sander and others explain this has obvious benefits

I corrected the link and left a read me.

Quick way to convert this to CS10(I use this to convert all my 9.modules to CS10)

1)Copy this module to somewhere
2)Look at the Kernel version of CS1O it should be 10.0.0 change it in the modules INI
3)At this point this should install in a CS10 system.
4)Open the module in builder unlock it .Open at least one script at this point on your left on the IDE there should be a icon that says 'Compile All'. Now depending on where you are it will compile all objects in "that" tree.If it errors out try to understand the error.Now I use a compile all script when there is a huge number of scripts to compile.You can find the script in builder itself.It is a re- purposement of recompile all scripts.lxe.

You do not have to do anything of that,if you know how to look at existing code.For this e.g I just looked at how OI allows you to create tables that is all.Frankly when I gave this to a friend he said it worked at that time.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Btw al those custom lxe scripts for separate tasks. I would opt to use the customizationsRT Module from Hans Stoop which you likely know. it holds virtually every task which otherwise would take ages and is error prone.

Regarding on how which framework, methodology or whatever is used by whomever in the O-script area is as with other languages totally up to the developer.

If I set the impression that I know it all best, then apologies . I do not. just sharing experience from my time at OTEX.

Sander

Everybody can manage the Deliverables from a Statement of Work. It takes a special talent to Deliver Quality. It takes endurance. Endurance creates distinction between true professionals and amateurs.
 
We use a similar mechanism like customizationsRT. It is proprietary hence has to remain unnamed.And no need to any apologies.In the absence of a best practices document to OT developers you do things that sound easy to do and maintain and basically you don't have to re-invent every time a request comes in.That is my motto

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top