Just to clarify, you set up the file DSN locally - then modify the
string you build to match the file path on your production environment
(using functions like #expandPath()# to reduce hard-coding of course)

---
Billy Cravens


-----Original Message-----
From: Cravens, Billy 
Sent: Friday, April 12, 2002 3:31 PM
To: CF-Talk
Subject: RE: DSN-Less DB Connection

I found that a good way to cheat when building the connection string is
to set up a file datasource (using the ODBC Control Panel applet) then
concatenate each line with a semi-colon delimiter (of course,  you'll
need to change any lines to match the server environment where the data
is stored)

---
Billy Cravens


-----Original Message-----
From: Bruce Sorge [mailto:[EMAIL PROTECTED]] 
Sent: Friday, April 12, 2002 3:34 PM
To: CF-Talk
Subject: Re: DSN-Less DB Connection

First, you will want to create a connection string like so:
<cfset DBPATH=ExpandPath("../../Database")>
<cfset DBFile="Baby.mdb">
<cfset Driver="{Microsoft Access Driver (*.mdb)}">
<cfset
ConStr="DRIVER=#Driver#;DBQ=#DBFile#;DefaultDir=#DBPATH#;UID=Admin;PWD=;
">

You then want to set up your CFQUERY like so:
<cfquery dbtype="dynamic" connectstring="#ConStr#" name="qAuthenticate">
Query goes here
</cfquery>

---------- Original Message ----------------------------------
From: Anthony DeStefano <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date:  Fri, 12 Apr 2002 13:17:51 -0700

Does anyone know the syntax to connect to an Access DB without a DSN?

Also, are there any pros/cons to using DSN-Less connections. I have done
it
in ASP without any noticable performance issues, but I am not sure about
how
ColdFusion deals with it.

Many Thanks,
Tony

Anthony DeStefano
Programmer/Analyst
Telect, Inc.
(509) 893-4375
[EMAIL PROTECTED]




______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to