Skip to main content
Participant
September 10, 2010
Question

How can I retrieve appname from coldfusion app in SQL?

  • September 10, 2010
  • 1 reply
  • 501 views

Hi all,

  When I try to use the connectstring attribute of the cfquery tab, I get this error:

An unknown attribute 'connectstring' has been encountered at document position (102:18) to (102:30) while processing tag CFQUERY. This tag can only take the following attributes:

  • BLOCKFACTOR
  • CACHEDAFTER
  • CACHEDWITHIN
  • DATASOURCE
  • DBNAME
  • DBPOOL
  • DBSERVER
  • DBTYPE
  • DEBUG
  • MAXROWS
  • NAME
  • PASSWORD
  • PROVIDER
  • PROVIDERDSN
  • SQL
  • TIMEOUT
  • USERNAME

Is there a replacement for connectstring where I can send the appname along with the query connection string info?

Thanks,

Carrie

This topic has been closed for replies.

1 reply

Inspiring
September 10, 2010

You need to setup a data source in the ColdFusion administrator.  The connectstring attribute was removed starting with CF 6.  If you are trying to specify an "Appliation Name" as part of a connection string you might try specifying that information in the advanced data source settings.

c_webgirlAuthor
Participant
September 11, 2010

Thank you. Can the session vars be accessed from the advanced data source settings?

I'd like to pass the #session.clientid# var in the connection string with the app name (which is why I was hoping to use the connectstring attribute in the cfquery tag -- to overwrite the dsn info)

I'm trying to determine who is logged on to the app when certain queries are run, and that is how to access that info - #session.clientid#

Thanks,

Carrie

Inspiring
September 13, 2010

You can work with data sources at runtime using the administrator API.

http://help.adobe.com/en_US/ColdFusion/9.0/Admin/WSc3ff6d0ea77859461172e0811cbf364104-7fcf.html