that or have a hidden form field that populates with an onChange of the file
field or with an onSubmit to grab the value of the upload field and populate
your hidden form field.  Then on the server use getFileFromPath() to get the
fileName value

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Scott
Thornton
Sent: Monday, February 28, 2005 10:09 AM
To: CFAussie Mailing List
Subject: [cfaussie] Re: Checking for File Name


Hmm,

do a cfdump of the form structure to find out what is in the form
file/browse item. If is is actually the file binary information, you may
need to create a hidden field, and populate its value with the name of
the file and its directory structure after the file field is input.

Then use ListLast(somefield, "\") to find the files name.

>>> [EMAIL PROTECTED] 28/02/2005 9:25:55 am >>>
I was trying to check for the file name in the DB before processing
the
cffile.  Is there a way to grab the file name out of the File form
field?

Chad

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Scott
Thornton
Sent: Monday, 28 February 2005 8:25 AM
To: CFAussie Mailing List
Subject: [cfaussie] Re: Checking for File Name


I believe that may be the case.

If you want the filename, the CFFILE structure will have it.

>>> [EMAIL PROTECTED] 25/02/2005 10:25:24 am >>>
I am comparing the nvarchar database field with Form.File.  Does that
mean I am comparing the database field against the file itself or just
the file name?

Chad

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Scott
Thornton
Sent: Friday, 25 February 2005 10:11 AM
To: CFAussie Mailing List
Subject: [cfaussie] Re: Checking for File Name


Hi,

Are you comparing the "form field containing a binary image" to a text
field, or are you comparing the name of the file on the form, to the
name in your database?



Scott Thornton, Programmer
Application Development
Information Services and Telecommunications
Hunter-New England Area Health Service
Phone  RNH +61 2 49236078 JHH +61 2 49214193
Fax       +61 2 49214191

[EMAIL PROTECTED]
>>> [EMAIL PROTECTED] 02/25/05 9:59 AM >>>
Just had an issue pop up, wondering if you guys had any ideas why...

When I upload a file, I log the file name into the DB.  Before the
cffile, I check to see if another file with the same name exists with
something like:

SELECT ProjectFileName
FROM ProjectFileTable
WHERE ProjectFileName='#form.LogFile#'

and form.LogFile is the File type form field.

It used to work, and now I am getting:

"[Microsoft][ODBC SQL Server Driver][SQL Server]The text, ntext, and
image data types cannot be compared or sorted, except when using IS
NULL
or LIKE operator."

I proabably changed something, can't figure out what...

Chad



---
You are currently subscribed to cfaussie as:
[EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To
unsubscribe send a blank email to
[EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/


---
You are currently subscribed to cfaussie as:
[EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To
unsubscribe send a blank email to
[EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/


---
You are currently subscribed to cfaussie as:
[EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/



---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to