Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

cfdbinfo question

New Here ,
Apr 15, 2008 Apr 15, 2008
I'm trying to find out the name of a DB that a datasource is using (no access to the administrator). My understanding of the cfdbinfo tag is that it can return the DB name used in the datasource. However, when I try to display it, it returns ALL the names of the different DBs that exist. How is this possible? Shouldn't it be a single value?

<cfdbinfo name="GetDBName" datasource="#dsource#" type="dbnames">
<cfoutput query="GetDBName">
<strong>the DB is #database_name#</strong><br>
</cfoutput>


452
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 16, 2008 Apr 16, 2008
<cfdbinfo /> will provide the names of all of the DBs that the user who logged in through the DSN has access to. I know that as an Oracle user, I have access to many DBs and that when I create a DSN it does not ask me for a Database name, just a user/pass. Then cfdbinfo returns all of the DBs I have access to see.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 16, 2008 Apr 16, 2008
As a follow up, I just tried it again with MySQL and it returned to result. The information_schema and the name of the DB that the DSN asked for. So I am guessing that you, like me, are using Oracle.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 16, 2008 Apr 16, 2008
i am using mysql, and cfdbinfo returns me a list of ALL my datasources,
not even just mysql.

does anyone think the docs on cfdbinfo are very misleading?:

cfdbinfo
Description
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.
Usage
Use the cfdbinfo tag to return a query object that contains information
about a database. The query object varies,
depending on the value that you specify in the type attribute.

it reads to me as it should retrieve info only about one requested ds...


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 17, 2008 Apr 17, 2008
LATEST
quote:

Originally posted by: Newsgroup User
i am using mysql, and cfdbinfo returns me a list of ALL my datasources,
not even just mysql.

does anyone think the docs on cfdbinfo are very misleading?:

cfdbinfo
Description
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.
Usage
Use the cfdbinfo tag to return a query object that contains information
about a database. The query object varies,
depending on the value that you specify in the type attribute.

it reads to me as it should retrieve info only about one requested ds...


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



LOL - hence my question - the docs make it sould like the tag is supposed to return a single value for the DB name. But it returns the entire list. Guess I need to improvise a little. (BTW- I'm using SQL Server)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources