Try this:
<CFFILE ACTION="UPLOAD"
FILEFIELD="form.yourfilefieldname"
DESTINATION="d:\inetpub\directorylocation\"
<!---If sending to an outside hosting firm--->
NAMECONFLICT="ERROR">
<CFQUERY DATASOURCE="dbname" DBTYPE="ODBC">
INSERT INTO tablename(ObjURL,
SubType,
FileExt,
directory,
obj_ServerFile,
filesize)
VALUES('#File.ServerDirectory#\#File.ServerFile#',
'#File.ContentSubType#',
'#File.ServerFileExt#',
'#File.ServerDirectory#',
'#File.ServerFile#',
'#File.FileSize#')
</CFQUERY>
Mark
-----Original Message-----
From: Shally [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 31, 2001 9:59 AM
To: CF-Talk
Subject: Please help!!
Hello Every one,
I am using Cffile in my action page to upload a file
in a particular location.
This is working fine.
But then I have to insert the file name which is being
uploaded in my table too.
I used Cfinsert aswell as SQL insert statement to
insert the file name in the database biut neither
worked.
Please Help!!
Shally
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists