<HTML>
<HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
   <META NAME="description" CONTENT="orgchartGenerator java applet.">
   <META NAME="keywords" CONTENT="orgchartGenerator6, organizational chart,   java, applet, N.R. Senthilnathan, interactive, intranet utility, intranet   tool, Nalla Senthilnathan">
   <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (Win95; I) [Netscape]">
   <TITLE>orgchartGenerator9</TITLE>
</HEAD>
<BODY BGCOLOR="#EEEEE1">
&nbsp;
<% @Language="VbScript" %>
<%
dim conn
dim strconn
dim Gamers
dim strsql
dim strID
dim latname
dim firstname
dim dept
dim id
dim strmsg
dim count

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\nsenthil\db\mydb.mdb"))
set rs = conn.execute("select eid,mid,fname,lname,title from orgtable")
%>
<BLOCKQUOTE>
<H2>
<FONT COLOR="#CC0000">orgchartGenerator9</FONT></H2>
<HR SIZE=3 NOSHADE WIDTH="100%">
Here is a demo of the applet where the chart data is generated dynamically from the server.
This example illustrates the use of a new param SQL_OUTPUT_DATA.
The value of this param is set to "yes".
The ASP code used for this example is given <a href="ocgen9geo_asp.txt">here</a>. The data is
extracted from an Access database table called orgtable with the following data:<br>
<center>
<table BORDER=0 BGCOLOR="#A3C59A" >
<tr>
<td BGCOLOR="#009900">
<center><font color="#FFFFFF">eid</font></center>
</td>

<td BGCOLOR="#009900">
<center><font color="#FFFFFF">mid</font></center>
</td>

<td BGCOLOR="#009900">
<center><font color="#FFFFFF">lname</font></center>
</td>

<td BGCOLOR="#009900">
<center><font color="#FFFFFF">fname</font></center>
</td>

<td BGCOLOR="#009900">
<center><font color="#FFFFFF">title</font></center>
</td>
</tr>

<tr>
<td>1</td>

<td>0</td>

<td>'Senthilnathan'</td>

<td>'Nalla'</td>

<td>'President and CEO'</td>
</tr>

<tr>
<td>2</td>

<td>1</td>

<td>'Morocco'</td>

<td>'Doug'</td>

<td>'Sales asia Pacifc'</td>
</tr>

<tr>
<td>3</td>

<td>1</td>

<td>'Mandarin'</td>

<td>'Tom'</td>

<td>'sales Americas'</td>
</tr>

<tr>
<td>4</td>

<td>1</td>

<td>'Bucharest'</td>

<td>'Mike'</td>

<td>'Sales australia'</td>
</tr>

<tr>
<td>5</td>

<td>2</td>

<td>'Last52'</td>

<td>'First52'</td>

<td>'Title52'</td>
</tr>

<tr>
<td>6</td>

<td>2</td>

<td>'Last62'</td>

<td>'First62'</td>

<td>'Title62'</td>
</tr>

<tr>
<td>7</td>

<td>4</td>

<td>'Last74'</td>

<td>'First74'</td>

<td>'Title74'</td>
</tr>
</table>
</center>
The dynamically generated chartdata param can be seen <a href="sqlout.txt">here</a>.
The data format is explained
<a href="http://www.geocities.com/nsenthil/ocgen9/ocgen9params.html">here</a>.
<ADDRESS>
<FONT COLOR="#EEEEE1">To handle a bug in IE3.0</FONT></ADDRESS>

<BR>
<!-- The archive attribute is required for IE5+ users -->
<center>
<APPLET code="ocgen9_try.class"   archive="ocg9classes.jar"
width="700" height="500">
<PARAM name="BGCOLOR"
value="ffffff"><PARAM name="TEXTCOLOR" value="000000"><PARAM name="BASEX"
value="340"><PARAM name="BASEY" value="40"><PARAM name="BOXWIDTH" value=130><PARAM
name="BOXHEIGHT" value=60><PARAM name="BOXHSPACE" value=30><PARAM
name="BOXVSPACE" value=50><!-- fontnames can be "Helvetica",
"TimesRoman", "Courier", "Dialog" or "DialogInput"-->
 <!-- fontstyles can be "plain", "italic", "bold" or
"bold-italic" -->
<PARAM name="FONT_LINE1" value="Helvetica;plain;12">
<PARAM name="FONT_LINE2" value="Helvetica;plain;12">
<PARAM name="FONT_LINE3" value="Helvetica;plain;12">
<PARAM name="FONT_LINE4" value="Helvetica;plain;12">
<PARAM name="STRINGSPACE" value=20><PARAM name="HIGHLIGHTCOLOR"
value="ff0000" ><PARAM name="FILLCOLORBOX" value="yes" >
<PARAM name="TARGETFRAME" value="_self"><PARAM name="SEARCHOPTION" value="yes">
<PARAM name="VERTICAL_LEAF_BRANCH" value="yes">
<PARAM name="DRAGOPTION"
value="yes"><PARAM name="COPYRIGHT" value="(c)
1997-1999 Nalla Senthilnathan, nsenthil@hotmail.com"><!-- optionally can
specify one of the substrings in the boxes as DEFAULTSEARCHSTRING to center
the box --><PARAM name="DEFAULTSEARCHSTRING" value="">
<PARAM name="SQL_OUTPUT_DATA" value="yes">
<PARAM name="CHARTDATA" value="

<% do while not rs.EOF %>
<%= rs.fields("eid") %>;<%= rs.fields("mid") %>;
<%= rs.fields("fname") %> <%= rs.fields("lname") %>;
<%= rs.fields("title") %>;0;0;ffcc66;emp1.html|
<%
rs.movenext
loop
conn.close
set conn = nothing
%>

">
</APPLET>
</center>
<A NAME="download"></A>
<ADDRESS>
<FONT COLOR="#EEEEE1">To handle a bug in IE3.0</FONT></ADDRESS>


<P>
<HR SIZE=3 NOSHADE WIDTH="100%">
<CENTER><A HREF="http://www.geocities.com/nsenthil/ocgen9/ocgen9.html" target="_top">Back</A> |
<A HREF="http://www.geocities.com/nsenthil/index.html" target="_top">Home</A> |
<I><A HREF="mailto:nsenthil@hotmail.com">Nalla
Senthilnathan</A></I></CENTER>
</BLOCKQUOTE>

</BODY>
</HTML>