Ask a Question related to Coldfusion Database Access, Design and Development.
-
lostnhouston #1
Upload File to Access Database
I have a Dreamweaver Page which is attached to a MS Access Database in Cold
Fusion. In the page is a browse button which opens the select file dialog box
in a Insert Record Form. I want the user to select a image file and have a
button tu upload the image along with the other fields into the access
database. When I attempt this the picture does not appear in the Access
database. All the other text fields from the Insert Record Form work properly.
What do I need to do to get the images into the Access Database? I understand
it is best to have the images go to a directory in the server and only the
image name and directory will appear in the field in the access database. I
want the user to be able to upload up to 6 files (images)
Here is the code I currently have for the page. The fImage1 field is the
image for the file upload button.
Thenks
<cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
<cfif IsDefined("FORM.MM_InsertRecord") AND FORM.MM_InsertRecord EQ "form1">
<cfquery datasource="cprogram">
INSERT INTO newuserm (lname, fname, mMth, mDay, mYr, address, citytown,
email, hphone, wphone, cphone, mlookAge, languages, religion, mMar, mChild,
profession, mHeight, mWeight, Measurments, Hobbies, Notes, Details, fImage1,
fImage2, fImage3, fImage4, fImage5, fImage6, m18, mTerms, mPriv, mProdFive,
mProdSix, mProdOne, mProdTwo, mProdThree, mProdFour, ccPay, ccType, ccName,
ccNumber, cMth, cYr, sInst) VALUES (
<cfif IsDefined("FORM.lname") AND #FORM.lname# NEQ "">
'#FORM.lname#'
<cfelse>
NULL
</cfif>
,
<cfif IsDefined("FORM.fname") AND #FORM.fname# NEQ "">
'#FORM.fname#'
<cfelse>
NULL
</cfif>
,
<cfif IsDefined("FORM.mMth") AND #FORM.mMth# NEQ "">
'#FORM.mMth#'
<cfelse>
NULL
</cfif>
,
<cfif IsDefined("FORM.fImage1") AND #FORM.fImage1# NEG "">
'#FORM.fImage1#'
<cfelse>
NULL
</cfif>
:confused;
lostnhouston Guest
-
upload a jpg file to an access database...???
I think I heard that you can't have a jpg in an access database, however you could point to where the jpg was from within the database. What I need... -
upload a jpg to an access database?
Is it possible to upload a jpg file into a access database or is there a better method for diplaying user uploaded pictures? I want registered users... -
Upload Image to access database. ASP
Hi. I have an Insert Record behavior. This is a form with some fields to insert text in a accessdatabase but i need insert an image too. How can i... -
upload a file to a database in my sql
I have a B.D made in access and of which also I have respective tables of the B.D. in xls. However what I want is: To come back to make the... -
Upload images to Access database
How can I easy upload picture to an MS access database.



Reply With Quote

