<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>INFLIBNET</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><BASE
href="file://C:\My Documents\"><!-- #cfcf97 and #e0e0cc and superb #295B58
<head>
<META content="MSHTML 5.50.4807.2300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff background=cid:986201415@16092002-2a3a>
<DIV><SPAN class=986201415-16092002><FONT face=Arial color=#0000ff size=2>Hi
Mayur,</FONT></SPAN></DIV>
<DIV><SPAN class=986201415-16092002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=986201415-16092002><FONT face=Arial color=#0000ff size=2>You
can find an example for mysql database access in the newsmodul on the opencms
website. Download the sources. Go to NewsContentDefinition.java. Here you can
find methods like write(); or delete(); Here you can study how a jdbc connection
is established.</FONT></SPAN></DIV>
<DIV><FONT size=2><SPAN class=986201415-16092002><FONT color=#0000ff><FONT
face=Arial>The connection over the connection pool itself is established with
c_pool. Make sure your module has a property called poolname with the value
<SPAN lang=EN-GB
style="FONT-SIZE: 10pt; LAYOUT-GRID-MODE: line; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-GB; mso-fareast-language: DE; mso-bidi-language: AR-SA">jdbc:opencmspool:mysql
(if you have problems to get it run --> compare it with the entry in opencms
registry).</SPAN></FONT></FONT></SPAN></FONT></DIV>
<DIV><SPAN class=986201415-16092002><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; LAYOUT-GRID-MODE: line; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-GB; mso-fareast-language: DE; mso-bidi-language: AR-SA"><FONT
face=Arial color=#0000ff>The variable c_pool can be filled in over event
mechanism like:</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=986201415-16092002></SPAN><SPAN class=986201415-16092002><FONT
face=Arial color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=986201415-16092002><FONT face=Arial color=#0000ff size=2>
// static event handler that is automatically called when the module parameters
are modified<BR> static {<BR> try
{<BR> // try to update the
moduleparameters<BR>
moduleParameterWasUpdated(null);<BR> }
catch(CmsException exc) {<BR> if
(I_CmsLogChannels.C_PREPROCESSOR_IS_LOGGING && A_OpenCms.isLogging() )
{<BR> A_OpenCms.log(C_MODULE_CRITICAL,
"[FeeCD]" + ": Error while updating module parameters : " +
exc.toString());<BR> }<BR>
}<BR> }</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=986201415-16092002><FONT face=Arial color=#0000ff size=2>
/**<BR> * This event-method is invoked if a user changes a parameter
for a module in the module-administration.<BR> * @param CmsObject
The current CmsObject.<BR> */<BR> public static void
moduleParameterWasUpdated(CmsObject cms) throws CmsException
{<BR> c_pool =
OpenCms.getRegistry().getModuleParameterString("<your.package.modulename>",
"poolname");<BR> }<BR></FONT></SPAN></DIV>
<DIV><FONT size=2><SPAN class=986201415-16092002>good luck and </SPAN>best
regards<BR>Manfred<BR><BR><BR>----------------------------------------------<BR>IFCOS
Institut für Zell- und Organsimulation GmbH<BR>Friedrich-Barnewitz-Strasse
3<BR>18119 Rostock<BR>phone: +49 (0)381.5196-190<BR>fax: +49
(0)381.5196-137<BR>email: manfred.pruntsch@ifcos.com<BR></FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
owner-opencms-dev@www.opencms.org
[mailto:owner-opencms-dev@www.opencms.org]<B>On Behalf Of </B>Mayur
Solanki<BR><B>Sent:</B> Thursday, September 12, 2002 1:34 PM<BR><B>To:</B>
opencms-dev@www.opencms.org<BR><B>Subject:</B> [opencms-dev] jdbc and mysql
connection<BR><BR></FONT></DIV>
<DIV><FONT face=Fixedsys color=#000080>Hello,</FONT></DIV>
<DIV><FONT face=Fixedsys color=#000080> </FONT></DIV>
<DIV><FONT face=Fixedsys color=#000080> I have only
knowledge about core java, I don't know Advanced.</FONT></DIV>
<DIV><FONT face=Fixedsys color=#000080> Please give me idea
about </FONT><FONT face=Fixedsys color=#000080>connectivity mysql to
jdbc.</FONT></DIV>
<DIV><FONT face=Fixedsys color=#000080> I have alrealy
jdbc driver.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Fixedsys color=#000080> If anybody can
give short sample code for connecting mysql to jdbc,</FONT></DIV>
<DIV><FONT face=Fixedsys color=#000080> it will be really
appreciated.</FONT></DIV>
<DIV><FONT face=Fixedsys color=#000080> Advanced
thanks.</FONT></DIV>
<DIV><FONT face=Fixedsys color=#00008b> </FONT></DIV>
<DIV><FONT face=Fixedsys color=#00008b></FONT> </DIV>
<DIV><FONT face=Fixedsys
color=#00008b>Mayur.</FONT></DIV></BLOCKQUOTE></BODY></HTML>