Ask a Question related to Coldfusion Database Access, Design and Development.
-
jtdavidson83 #1
Use CF Datasources outside CF
I need to create a JSP on the coldfusion server, and access coldfusion datasources in that JSP. Is there anyway to do this in CF6.1 or CF7.
Thanks.
jtdavidson83 Guest
-
List all available Datasources
Hi@all! How can I do it, that I get all datasources that are registerd in the CF-Server? I tried somethin like that but it did'nt work: ... -
Listing Datasources in MX 6.1
Anyone know what's up with CFMX 7 and doing this same thing? It's clearly been ripped out and re-done with the new funtionality in the api's...... -
Listing Datasources in MX 6.1
Anyone know what's up with CFMX 7 and doing this same thing? It's clearly been ripped out and re-done with the new funtionality in the api's...... -
CF5 Datasources missing
:confused; Hi folks, I was wondering if anyone can help. My datasources have gone missing in CF5 Administrator, and now my apps refuse to work.... -
2 datasources in 1 CFQUERY
Hello, Some of our Access tables are being moved to our SQL Server, while some remain in Access. I have two datasources that separate the SQL from... -
robsandeh #2
Re: Use CF Datasources outside CF
I need to do that too with a ColdFusion MX7.1 Server configuration.
Here's the code for a J2EE configuration.
String sql = "SELECT trip_id, name, teaser, price FROM trip";
java.sql.Connection connection=null;
java.sql.Statement stmt=null;
java.sql.ResultSet trips=null;
javax.naming.InitialContext ctx = new javax.naming.InitialContext();
javax.sql.DataSource ds = (javax.sql.DataSource)
ctx.lookup("java:comp/env/jdbc/ds-name");
connection=ds.getConnection();
stmt=connection.createStatement();
trips=stmt.executeQuery(sql);
robsandeh Guest



Reply With Quote

