Lets you retrieve information about a data source, including details about the database, tables, queries, procedures, foreign keys, indexes, and version information about the database, driver, and JDBC.
This tag supports only JDBC drivers, and does not support ODBC-based drivers, including the Microsoft Access driver.
This tag cannot have a body.
This tag is also supported within <cfscript>
<cfdbinfo
datasource=object
name=string
type=string
procedure=string
dbname=string
password=string
pattern=string
table=string
username=string
filter=string
>
Collapse All
Attribute
Description
datasource
object, optional
Datasource to use to connect to the database.
name
string, required
Name to use to refer to the result.
Alias:
variable
type
string, required
Type of information to get:
dbnames: database name and type
tables: information to all tables
columns: column information to a single table/view
version: version information of the database
procedures: information to all procedures
procedure_columns: column information to a single procedure
foreignkeys: information to all foreignkeys
index: information to all indexes
procedure
string, optional
Name of the procedure from which you retrieve information.
dbname
string, optional
Name of the database
Alias:
dbnames
password
string, optional
Password to connect to the database.
pattern
string, optional
Specifies a filter to retrieve information about specific tables, columns, or stored procedures
table
string, optional
Name of the table from which you retrieve information.
username
string, optional
User name to connect to the database.
filter
string, optional
Filter for type="tables" with a wildcard, defaults to all types when empty.
"TABLE"
"VIEW"
"SYSTEM TABLE"
"GLOBAL TEMPORARY"
"LOCAL TEMPORARY"
"ALIAS"
"SYNONYM"
Note: Each Database implementation has it's own supported types
Introduced: Lucee 6.0.0.76
Alias:
tabletype
Introduced: 6.0.0.73
Examples
CFDBINFO Syntax
<cfdbinfo type = "columns" name = "db_info" datasource = "lucee" dbname = "tester" table = "test" >
See also