Ask a Question related to Coldfusion Database Access, Design and Development.
-
BinaryDesire #1
Connect to database using encrypted password
I'm needing to connect to a database manually (not using cfquery). However I'm
not wanting to hardcode the password into the file. I have a datasource defined
already that I can read using
coldfusion.server.ServiceFactory.getDataSourceServ ice(). This allows me to find
out the password for the database which is encrypted (hashed I believe). Does
anyone know of a way to connect to the database using the encrypted password?
Example of code that I'm wanting to work (problem is txtPassword is encrypted)
(assume application.dsn is already defined)
factory = createObject("java", "coldfusion.server.ServiceFactory");
dsService = factory.getDataSourceService();
strDataSources = dsService.getDataSources();
txtUserID = strDataSources[application.dsn].username;
txtPassword = strDataSources[application.dsn].password;
txtServer = strDataSources[application.dsn].urlmap.host;
txtPort = strDataSources[application.dsn].urlmap.port;
conn_url =
"jdbc:macromedia:sqlserver://#txtServer#:#txtPort#;databaseName=MyDB;SelectMeth o
d=direct;sendStringParametersAsUnicode=false";
class = createObject("java", "java.lang.Class");
class.forName("macromedia.jdbc.MacromediaDriver");
dm = createObject("java", "java.sql.DriverManager");
con = dm.getConnection(conn_url, txtUserID, txtPassword);
BinaryDesire Guest
-
Selling encrypted PDFs online with buyer's email as password?
Hi all I am planning on selling a PDF file online. The content is the same for every buyer, however I'd like to encrypt the PDF with the buyer's... -
Encrypted Password
I am trying to use an existing customer table in our SQL database for another Member-Only section of our web site, so they will share the same... -
Storing encrypted password in xml file??
Hi, I have an XML file that stores a Profile of a user, including the username, password, server name, etc. I want to be able to leave the XML... -
Forgot Password encrypted email system
I really wish there were some examples explaining how to create a forgot password email link system when you encrypt a password in a database and... -
Unable to connect to Access database - Not a valid account name or password.
Hi All, Sorry for cross posting, but I am not sure where the problem is. Problem: I am not able to connect to any of my Access databases using...



Reply With Quote

