Adobe Community
All community
This category
This board
Knowledge base
Users
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results forÂ
ShowÂ
 onlyÂ
|
Search instead forÂ
Did you mean:Â
Global community
Language:
Deutsch
English
Español
Français
Português
日本語コミュニティ
Dedicated community for Japanese speakers
í•œêµ ì»¤ë®¤ë‹ˆí‹°
Dedicated community for Korean speakers
Sign In
Exit
Home
ColdFusion
Discussions
Factory, Datasource, ServerName
Home
ColdFusion
Discussions
Factory, Datasource, ServerName
0
Upvote
Factory, Datasource, ServerName
Hanno1962
Explorer
,
/t5/coldfusion-discussions/factory-datasource-servername/td-p/777828
Nov 15, 2006
Nov 15, 2006
Copy link to clipboard
Copied
I am using
<CFOBJECT ACTION="CREATE" TYPE="JAVA" CLASS="coldfusion.server.ServiceFactory" NAME="factory">
<!--- Get datasource service --->
<CFSET dsService=factory.getDataSourceService()>
<!--- Get datasources --->
<CFSET dsFull=dsService.getDatasources()>
<!--- Extract names into an array
<CFSET dsNames=StructKeyArray(dsFull)>
Many thanks
<cfset dsNames = dsService.getNames()>
TOPICS
Advanced techniques
Views
224
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Reply
1
Jump to latest reply
cf_dev2
Guide
,
/t5/coldfusion-discussions/factory-datasource-servername/m-p/777829#M72243
Nov 15, 2006
Nov 15, 2006
Copy link to clipboard
Copied
LATEST
There may be a better way, but you could start by dumping the full datasource info
<cfdump var="#dsFull#">
There is a structure for each datasource. Most seem to contain a key named urlmap.host. That might be what you're looking for.
Votes
0
Upvote
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Post Reply
Preview
Exit Preview
never-displayed
You must be signed in to add attachments
never-displayed
Â
Resources
Documentation
ColdFusion User Guide