McHack
asked on
Data source connection without ColdFusion Administrator
Does anyone know if it is possible to connect to a data source without using ColdFusion Administrator?
If it is possible can anyone show an example connection to an Access database and one to an Excel spreadsheet?
If it is possible can anyone show an example connection to an Access database and one to an Excel spreadsheet?
ASKER
anandkp
Thanks for the input.
Will this work if the data source is on a remote server?
In other words will I have to be able to set up an ODBC connection or will the code you posted handle the entire connection process even if the data source is on a remote server?
Thanks for the input.
Will this work if the data source is on a remote server?
In other words will I have to be able to set up an ODBC connection or will the code you posted handle the entire connection process even if the data source is on a remote server?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The problem is that doesn't work with CFMX, if you use cfmx you can have some troubles finding a solution, the only solution to that problem ( if using cfmx ) is to conect thru ADO, wich is very painfull and only works in the win platform ...
regards,
idss
regards,
idss
ASKER
Thanks anandkp
I think this should work.
I think this should work.
<cfset DBPath="D:\InetPub\wwwRoot
<cfquery name="QueryName"
datasource="#DBPath#"
dbtype="OLEDB"
provider="Microsoft.Jet.OL
providerdsn="#DBPath#"
username="Admin"
password="">
..Your SQL statments...
</cfquery>
OR
<cfquery
name="selectData"
connectstring="Provider=SQ
dbtype="dynamic">
select username from users
</cfquery>
K'Rgds
Anand