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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return upload file as string in db

Status
Not open for further replies.

pervenches

Programmer
Mar 2, 2005
3
CH
Hello,
I have found the following upload file:
which I integrated in my form.
The form loads up an image and writes data in a database. Everything works fine exept the name of the image is not writen in the database.
How can I return the name of the uploaded file?
My attempt lookes something like that:

<%
FUNCTION fixQuotes( theString )
fixQuotes = REPLACE( theString, "'", "''" )
END FUNCTION
' Get the Form Variables
productPicture = Uploader.Form( "productPicture" )
' Open the Database Connection
...%>
<%
' Add New Product
sqlString = "INSERT INTO Products " &_
"( product_picture ) VALUES ( " &_
" '" & productPicture & " )"
Con.Execute sqlString
%>

Regards,
Pervenches
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top