<%@ page import="com.synaptic.sql.ConnectionWrapper" %> <%@ page import="com.entplace.sql.DataSource" %> <%@ page import="java.sql.Statement" %> <%@ page import="java.sql.ResultSet" %> <%@ page import="java.util.StringTokenizer" %> <%@ taglib uri="http://www.entplace.com/taglibs/ep" prefix="ep" %> <%! static String[] letters = new String[27]; static { int i = 0; for (char a = 'A'; a <= 'Z'; a++) { letters[i] = java.lang.String.valueOf(a); i++; } letters[letters.length-1] = "Other"; } static private ConnectionWrapper getConnection() throws Exception { DataSource d = DataSource.getDataSource(""); ConnectionWrapper c = null; c = new ConnectionWrapper(d.getConnection()); return c; } %> <% StringTokenizer np = new StringTokenizer(node.getPath(), "/"); String host = np.nextToken(); String sql; String search = form.getValue("search"); if (search == null) { search = form.getValue("chapter"); if (search == null) { search = "A%"; } } if (search.startsWith("Other")) { sql = " SELECT iEntryNo, vcEntry, txtDescription " + " FROM tbl_Glossary WHERE vcEntry LIKE '[^A-Za-z]%'" + " order by vcEntry"; } else { sql = " SELECT iEntryNo, vcEntry, txtDescription" + " FROM tbl_Glossary WHERE vcEntry LIKE '" + search + "%' " + " order by vcEntry"; } %>
 
Entrepreneur's Place Glossary
 
Our Glossary of Business and financial terms is designed to help you better understand the business process. Whether you're starting a business, buying or selling a business, financing a business or operating a business, you have to understand the terms that professionals frequently use. If there is a business term that you've heard that we haven't listed, please let us know, and we'll add it to the Entrepreneur's Place Glossary.
 
Glossary - Browse Alphabetically
 
<% for (int ii = 0; ii < letters.length; ii++) { String cl = "linkb"; // if (letters[ii].equals(chapter)) { // cl = "linkba"; // } %> <%= letters[ii] %>  <% } %>
 
or
 
Search by Specific Term:
<% int count = 0; ConnectionWrapper c = getConnection(); Statement s = c.createStatement(); ResultSet rs = s.executeQuery(sql); while (rs.next()) { count++; %>  
<%= rs.getString(2) %>
<%= rs.getString(3) %>
<% } c.close(rs); c.close(s); c.close(); if (count == 0) { %>  
Sorry, the term you have entered is not available in the glossary
<% } %>