Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC Database Directory

Status
Not open for further replies.

whr

Programmer
Jan 11, 2001
1
PR
Is there an option/attribute in the cfquery to specify the Database Directory?

We don't want to put the directory in the ODBC Data Source because we want the user to be able to specify any directory they desire.

The following technique using #dbdir# is a work-around, but we would prefer a technique where we don't have to modify all the SQL statements.

<cfset dbdir = &quot;/home/auser/data/&quot;>
<cfquery name=&quot;qGetEmployees&quot; datasource=&quot;somedb&quot;>
SELECT strFName, strLName, strPhone
FROM #dbdir#employees
</cfquery>

Thanks in advance.
 
Hi,

You wouldnt need to do it using <CFQUERY>, ColdFusion has a special tag with attributes for creating Directories.
You can capture the name of the directory the user desires via a form and pass it as a form variable to an action page which can create the directory for you...
The code would look something like :
<CFDIRECTORY ACTION =&quot;Create&quot; DIRECTORY = &quot;Your directory Name&quot;/#User Specified Directory#&quot;>

What you can do is then allow users to upload files to that directory, store the name of the user directory in your DB to allow you to specify the files for that user

I think thats what you mean?

Sam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top