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

Can't get password string from DB in coldfusion 11 but it works well in coldfusion8

Guest
Aug 09, 2016 Aug 09, 2016

Copy link to clipboard

Copied

The below shown code works well on CF8. password can get from DB successfully. But it doesn't work on CF11. It can't retrive password from DB. Password is always empty. username and datasource can get from DB. The password stored in DB is displayed as:

0-8VB>D;.<MQ95X$(5M2$>P  

I guess maybe CF11 variable can't store complex/special string? How to save it? I need get password from DB and then decrypt it.

<cfquery datasource="#XXXX#" name="GetConfig">

SELECT S.A

,IsNull(ds.column_a, '') AS DataSource

,IsNull(un.column_a, '') AS Username

,IsNull(pw.column_a, '') AS Password

FROM (SELECT column_a AS A FROM table_a WHERE column_b='xxxx1') s

LEFT JOIN table_a ds ON ds.column_b='xxxx2'

LEFT JOIN table_a un ON un.column_b='xxxx3'

LEFT JOIN table_a pw ON pw.column_b='xxxx4'

</cfquery>

<cfset qDataSource = GetConfig.DataSource />

<cfset qUsername = GetConfig.Username />

<cfset qPassword = GetConfig.Password />

<cfoutput>

<p>datasource:#qDataSource#</p>

<p>username:#qUsername#</p>

<p>password:#qPassword#</p>

</cfoutput>

Views

472

Translate

Translate

Report

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
Advocate ,
Aug 10, 2016 Aug 10, 2016

Copy link to clipboard

Copied

If you copy the text of that query and execute it in a query utility provided by the vendor of your database engine, does the query return a result?

Cheers

Eddie

Votes

Translate

Translate

Report

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
Guest
Aug 10, 2016 Aug 10, 2016

Copy link to clipboard

Copied

Yes the query can return result successfully. I can see the password is 0-8VB>D;.<MQ95X$(5M2$>P  from return result. I defined a vairable qPassword and set value as returned password. But it show nothing when I use cfoutput to print it.

Votes

Translate

Translate

Report

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
Advocate ,
Aug 11, 2016 Aug 11, 2016

Copy link to clipboard

Copied

LATEST

Okay, if the query works exactly as portrayed in your post then immediately after the <cfquery> closing tag, add the statement <cfdump var="#GetConfig#"> and let us know what you see.

Cheers

Eddie

Votes

Translate

Translate

Report

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
Documentation