c# barcode reader library DATABASE METADATA, PART 2 in Font

Printing PDF 417 in Font DATABASE METADATA, PART 2

CHAPTER 3 DATABASE METADATA, PART 2
Create PDF417 In None
Using Barcode printer for Font Control to generate, create PDF-417 2d barcode image in Font applications.
www.OnBarcode.com
Code 39 Full ASCII Maker In None
Using Barcode creation for Font Control to generate, create USS Code 39 image in Font applications.
www.OnBarcode.com
approximate: When true, the result is allowed to reflect approximate or out-of-date values; when false, the results are requested to be accurate (all table statistics are exact). Some drivers (such as the MiniSoft JDBC Driver) ignore this parameter and ensure that all table statistics are exact. This method retrieves a ResultSet object containing information about the indexes or keys for the table. The returned ResultSet is ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION. Each index column description has the columns shown in Table 3-1 (each row has 13 columns). Table 3-1. Result Columns for Invoking getIndexInfo()
QR Maker In None
Using Barcode generation for Font Control to generate, create QR Code JIS X 0510 image in Font applications.
www.OnBarcode.com
Generate EAN / UCC - 14 In None
Using Barcode encoder for Font Control to generate, create EAN / UCC - 14 image in Font applications.
www.OnBarcode.com
Field Name
Printing Barcode In None
Using Barcode generator for Font Control to generate, create Barcode image in Font applications.
www.OnBarcode.com
Data Matrix 2d Barcode Generation In None
Using Barcode encoder for Font Control to generate, create ECC200 image in Font applications.
www.OnBarcode.com
TABLE_CAT TABLE_SCHEM TABLE_NAME NON_UNIQUE INDEX_QUALIFIER INDEX_NAME TYPE
PDF417 Generator In None
Using Barcode creation for Font Control to generate, create PDF417 image in Font applications.
www.OnBarcode.com
Encode OneCode In None
Using Barcode drawer for Font Control to generate, create 4-State Customer Barcode image in Font applications.
www.OnBarcode.com
Type
PDF 417 Generation In Visual C#
Using Barcode drawer for .NET Control to generate, create PDF-417 2d barcode image in VS .NET applications.
www.OnBarcode.com
Decode PDF417 In C#
Using Barcode scanner for .NET framework Control to read, scan read, scan image in VS .NET applications.
www.OnBarcode.com
String String String boolean String String short
Drawing Code128 In None
Using Barcode generator for Microsoft Excel Control to generate, create Code128 image in Office Excel applications.
www.OnBarcode.com
Creating ECC200 In Objective-C
Using Barcode generation for iPad Control to generate, create ECC200 image in iPad applications.
www.OnBarcode.com
Description
Encode GS1 DataBar Limited In .NET
Using Barcode creator for .NET Control to generate, create GS1 DataBar Truncated image in VS .NET applications.
www.OnBarcode.com
Generate GS1-128 In Objective-C
Using Barcode creation for iPhone Control to generate, create EAN 128 image in iPhone applications.
www.OnBarcode.com
Table catalog (may be null). Table schema (may be null). Table name. Indicates whether index values can be non-unique. false when TYPE is tableIndexStatistic. Index catalog (may be null); null when TYPE is tableIndexStatistic. Index name; null when TYPE is tableIndexStatistic. Index type: tableIndexStatistic: Identifies table statistics that are returned in conjunction with a table s index descriptions tableIndexClustered: Is a clustered index tableIndexHashed: Is a hashed index tableIndexOther: Is some other style of index Column sequence number within the index; zero when TYPE is tableIndexStatistic. Column name; null when TYPE is tableIndexStatistic. Column sort sequence. A means ascending; D means descending; may be null if sort sequence is not supported; null when TYPE is tableIndexStatistic. When TYPE is tableIndexStatistic, then this is the number of rows in the table; otherwise, it is the number of unique values in the index. When TYPE is tableIndexStatistic, then this is the number of pages used for the table, otherwise it is the number of pages used for the current index. Filter condition, if any (may be null).
Barcode Recognizer In .NET Framework
Using Barcode recognizer for VS .NET Control to read, scan read, scan image in .NET framework applications.
www.OnBarcode.com
PDF 417 Printer In None
Using Barcode creator for Microsoft Excel Control to generate, create PDF 417 image in Excel applications.
www.OnBarcode.com
ORDINAL_POSITION COLUMN_NAME ASC_OR_DESC
Painting ECC200 In None
Using Barcode drawer for Software Control to generate, create Data Matrix image in Software applications.
www.OnBarcode.com
Recognizing QR Code In .NET
Using Barcode recognizer for Visual Studio .NET Control to read, scan read, scan image in .NET applications.
www.OnBarcode.com
short String String
UCC - 12 Maker In Java
Using Barcode encoder for Java Control to generate, create UPC Code image in Java applications.
www.OnBarcode.com
EAN / UCC - 13 Generation In None
Using Barcode drawer for Word Control to generate, create European Article Number 13 image in Microsoft Word applications.
www.OnBarcode.com
CARDINALITY
PAGES
FILTER_CONDITION
String
This method returns ResultSet, in which each row is an index column description. If a database access error occurs, it throws SQLException. As you can see from the returned ResultSet, it contains a lot of information. The best way to represent that information is XML, which may be used by any type of client.
CHAPTER 3 DATABASE METADATA, PART 2
The Solution: getIndexInformation()
The index information can be useful in sending proper SQL queries to the database. During runtime, for better response from the database, in formulating SQL s SELECT statement you can use the index columns in the WHERE clauses (otherwise, the database tables will be scanned sequentially). In passing actual parameters to the DatabaseMetaData.getIndexInfo() method, try to minimize passing null and empty values (passing null values might slow down your metadata retrieval). /** * Retrieves a description of the given table's indexes and * statistics. The result is returned as XML (as a string * object); if table name is null/empty it returns null. * * * @param conn the Connection object * @param catalog a catalog. * @param schema a schema. * @param tableName a table name; must match * the table name as it is stored in the database. * @param unique when true, return only indexes for unique values; * when false, return indexes regardless of whether unique or not * @param approximate when true, result is allowed to reflect * approximate or out of data values; when false, results are * requested to be accurate * @return an XML. * @exception Failed to get the Index Information. */ public static String getIndexInformation(java.sql.Connection conn, String catalog, String schema, String tableName, boolean unique, boolean approximate) throws Exception { ResultSet rs = null; try { if ((tableName == null) || (tableName.length() == 0)) { return null; } DatabaseMetaData meta = conn.getMetaData(); if (meta == null) { return null; }
CHAPTER 3 DATABASE METADATA, PART 2
The '_' character represents any single character. The '%' character represents any sequence of zero or more characters. = meta.getIndexInfo(catalog, schema, tableName, unique, approximate); StringBuffer sb = new StringBuffer("< xml version='1.0'>"); sb.append("<indexInformation>"); while (indexInformation.next()) { String dbCatalog = rs.getString(COLUMN_NAME_TABLE_CATALOG); String dbSchema = rs.getString(COLUMN_NAME_TABLE_SCHEMA); String dbTableName = rs.getString(COLUMN_NAME_TABLE_NAME); boolean dbNoneUnique =rs.getBoolean(COLUMN_NAME_NON_UNIQUE); String dbIndexQualifier = rs.getString(COLUMN_NAME_INDEX_QUALIFIER); String dbIndexName = rs.getString(COLUMN_NAME_INDEX_NAME); short dbType = rs.getShort(COLUMN_NAME_TYPE); short dbOrdinalPosition = rs.getShort(COLUMN_NAME_ORDINAL_POSITION); String dbColumnName = rs.getString(COLUMN_NAME_COLUMN_NAME); String dbAscOrDesc = rs.getString(COLUMN_NAME_ASC_OR_DESC); int dbCardinality = rs.getInt(COLUMN_NAME_CARDINALITY); int dbPages = rs.getInt(COLUMN_NAME_PAGES); String dbFilterCondition = rs.getString(COLUMN_NAME_FILTER_CONDITION); sb.append("<index name=\""); sb.append(dbIndexName); sb.append("\" table=\""); sb.append(dbTableName); sb.append("\" column=\""); sb.append(dbColumnName); sb.append("\">"); appendXMLTag(sb, "catalog", dbCatalog); appendXMLTag(sb, "schema", dbSchema); appendXMLTag(sb, "nonUnique", dbNoneUnique); appendXMLTag(sb, "indexQualifier", dbIndexQualifier); appendXMLTag(sb, "type", dbType); appendXMLTag(sb, "ordinalPosition", dbOrdinalPosition); appendXMLTag(sb, "ascendingOrDescending", dbAscOrDesc); appendXMLTag(sb, "cardinality", dbCardinality); appendXMLTag(sb, "pages", dbPages); appendXMLTag(sb, "filterCondition", dbFilterCondition); sb.append("</index>"); } sb.append("</indexInformation>"); return sb.toString(); } catch(Exception e) { throw new Exception("could not get table's Index Info: "+e.toString()); } finally { DatabaseUtil.close(rs); } }
Copyright © OnBarcode.com . All rights reserved.