|
Comments
|
Today's Top SOA Links
ColdFusion News Desk Scorpio Makes Obtaining Database And Table Info Easy
This is a feature first demonstrated in CT yesterday, a new tag in Scorpio named which does just that
By: Ben Forta
May. 16, 2007 01:45 PM
This is a feature first demonstrated in CT yesterday, a new tag in Scorpio named <CFDBINFO> which does just that, it returns information about databases (and data sources, and tables, and columns, and stored procedures, and more). This first code snippet shows how to obtain a list of tables in a specified data source (using the default database):
<cfdbinfo type="tables" datasource="myDSN" name="tables"> To get column details you can do the following: <cfdbinfo type="columns" datasource="myDSN" table="myTables" name="columns"> This would return a query containing column names, type, size, default values, whether it allows NULL values, key associations, and more. As you can see, <CFDBINFO> accepts a TYPE attribute which tells it what information you want, and the following types are supported:
Reader Feedback: Page 1 of 1
Your Feedback
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week |
|||||||||||||||||||||||||||||||||