Forums

This topic is locked

It only displays the first image that was uploaded

Posted 30 Jan 2005 02:07:47
1
has voted
30 Jan 2005 02:07:47 David Ortiz posted:
Hello,

I have the image being uploaded and placed in a database- Working great.

I have everything working except for the following.

On the confirmation page, I can not get the uploaded image to display. It only displays the first image that was uploaded to the server.

Can you help me???

Thanks!

Replies

Replied 30 Jan 2005 04:24:47
30 Jan 2005 04:24:47 Chris Charlton replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>On the confirmation page, I can not get the uploaded image to display. It only displays the first image that was uploaded to the server.<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Just for clarification:
<ul><li>Displays the <i>first ever</i> image uploaded? or...</li><li>Displays the <i>users' first</i> image uploaded?</li>
<li>Are you doing a binary upload of the image in your DB? or...</li><li>Are you using a link reference to where the images' location (URL)?</li>
<li>Do you have any LIMIT commands in your SQL (Recordset) queries?</li><li>Are you using DW <i>Recordsets</i> or hand-coded SQL queries?</li>
<li>What version of DW are you using, MX or MX2004? And what <i>Server Model</i> language (PHP,ASP,.NET,CF,JSP)?</li></ul>
Replied 30 Jan 2005 05:37:28
30 Jan 2005 05:37:28 David Ortiz replied:

It Displays the first image In the Database only-

I am doing a link reference inside the database. have a look www.voila.us/icon/upload2.asp

Do you have any LIMIT commands in your SQL (Recordset) queries? NO
Are you using DW Recordsets or hand-coded SQL queries? DREAMWEAVER RECORDSETS

I am using Dreamweaver MX ASP- I rarely handcode. I am using your products for this.

There has to be a way to pass the URL key to the next page- I can't figure it out.

Thank you so much for your time!!! <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Replied 30 Jan 2005 07:37:23
30 Jan 2005 07:37:23 Chris Charlton replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>...Are you using DW Recordsets or hand-coded SQL queries? DREAMWEAVER RECORDSETS...<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Can you post your SQL to see if there may be any edits needed there.
Replied 30 Jan 2005 19:47:41
30 Jan 2005 19:47:41 David Ortiz replied:
This is from the upload page and not the receiving page. I need to pass the ID number (or key on my db) to the next page and have the next page see the ID to display the correct photo.

This is a lot of Dreamweaver code along with your product. If it's more than you asked for- I am sorry.

I am not good with hand coding at all. That's why I buy your products. I just need to pass the ID# to the next page in order to display it correctly.

&lt;%@LANGUAGE="VBSCRIPT"%&gt;
&lt;!--#include file="Connections/connImages.asp" --&gt;
&lt;!--#include file="ScriptLibrary/incPureUpload.asp" --&gt;
&lt;%
'*** Pure ASP File Upload 2.1.9
Dim GP_uploadAction,UploadQueryString
PureUploadSetup
If (CStr(Request.QueryString("GP_upload") &lt;&gt; "" Then
Dim pau_thePath,pau_Extensions,pau_Form,pau_Redirect,pau_storeType,pau_sizeLimit,pau_nameConflict,pau_requireUpload,pau_minWidth,pau_minHeight,pau_maxWidth,pau_maxHeight,pau_saveWidth,pau_saveHeight,pau_timeout,pau_progressBar,pau_progressWidth,pau_progressHeight
pau_thePath = """img"""
pau_Extensions = "GIF,JPG,JPEG,BMP,PNG"
pau_Form = "UPLOAD"
pau_Redirect = ""
pau_storeType = "file"
pau_sizeLimit = ""
pau_nameConflict = "uniq"
pau_requireUpload = "true"
pau_minWidth = "100"
pau_minHeight = "100"
pau_maxWidth = ""
pau_maxHeight = ""
pau_saveWidth = ""
pau_saveHeight = ""
pau_timeout = "600"
pau_progressBar = "RedFlashProgress.htm"
pau_progressWidth = "300"
pau_progressHeight = "100"

Dim RequestBin, UploadRequest
CheckPureUploadVersion 2.19
ProcessUpload pau_thePath,pau_Extensions,pau_Redirect,pau_storeType,pau_sizeLimit,pau_nameConflict,pau_requireUpload,pau_minWidth,pau_minHeight,pau_maxWidth,pau_maxHeight,pau_saveWidth,pau_saveHeight,pau_timeout
end if
%&gt;
&lt;%
' *** Edit Operations: (Modified for File Upload) declare variables

Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd

Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId

Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i

MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")
If (UploadQueryString &lt;&gt; "" Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(UploadQueryString)
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%&gt;
&lt;%
' *** Insert Record: (Modified for File Upload) set variables

If (CStr(UploadFormRequest("MM_insert") = "UPLOAD" Then

MM_editConnection = MM_connImages_STRING
MM_editTable = "Images"
MM_editRedirectUrl = "uploaded.asp"
MM_fieldsStr = "Username|value|file2|value|Comments|value"
MM_columnsStr = "Usernames|',none,''|Images|',none,''|Comments|',none,''"

' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|"
MM_columns = Split(MM_columnsStr, "|"

' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(UploadFormRequest(MM_fields(MM_i)))
Next

' append the query string to the redirect URL
If (MM_editRedirectUrl &lt;&gt; "" And UploadQueryString &lt;&gt; "" Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And UploadQueryString &lt;&gt; "" Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & UploadQueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & UploadQueryString
End If
End If

End If
%&gt;
&lt;%
' *** Insert Record: (Modified for File Upload) construct a sql insert statement and execute it

Dim MM_tableValues
Dim MM_dbValues

If (CStr(UploadFormRequest("MM_insert") &lt;&gt; "" Then

' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),","
MM_delim = MM_typeArray(0)
If (MM_delim = "none" Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none" Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none" Then MM_emptyVal = ""
If (MM_formVal = "" Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal &lt;&gt; "" Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'" Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''" & "'"
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i &lt;&gt; LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End If
MM_tableValues = MM_tableValues & MM_columns(MM_i)
MM_dbValues = MM_dbValues & MM_formVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & " values (" & MM_dbValues & ""

If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command"
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

If (MM_editRedirectUrl &lt;&gt; "" Then
Response.Redirect(MM_editRedirectUrl)
End If
End If

End If
%&gt;
Replied 30 Jan 2005 20:20:31
30 Jan 2005 20:20:31 David Ortiz replied:
I updated my signature- Sorry for not supplying this info from the beginning.

Dreamweaver MX, ASP, Access DB.

i Rarely handcode- I use your products. I am a visual person and I can't seem to understand the SQL yet. I understand ASP- I think.. I've been doing this for 10 years and I haven't had to hand code yet- LOL.
Replied 30 Jan 2005 21:35:51
30 Jan 2005 21:35:51 Chris Charlton replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>Dreamweaver MX, ASP, Access DB.<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Hmm, I assume you are doing an INSERT Recordset for the image uploaded.

Are ou using an <i>AutoNumber</i> for the ID's? If you are, then you need to capture the last insert ID and use that in your SQL that grabs the image (by last ID that was uploaded). Then you can even ouput their special link to have their image URL.

Making sense?
Replied 30 Jan 2005 22:00:42
30 Jan 2005 22:00:42 David Ortiz replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>Dreamweaver MX, ASP, Access DB.<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Hmm, I assume you are doing an INSERT Recordset for the image uploaded.

Are ou using an <i>AutoNumber</i> for the ID's? If you are, then you need to capture the last insert ID and use that in your SQL that grabs the image (by last ID that was uploaded). Then you can even ouput their special link to have their image URL.

Making sense?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Yes- That is what I am trying to do. I can't figure out how. Yes- on the insert ID- It's generated automatically.

Dreamweaver MX, ASP, Access DB.

i Rarely handcode- I use your products. I am a visual person and I can't seem to understand the SQL yet. I understand ASP- I think.. I've been doing this for 10 years and I haven't had to hand code yet- LOL.
Replied 31 Jan 2005 18:49:23
31 Jan 2005 18:49:23 Simon Martin replied:
Hi David

Is this the same issue as in your other post?
www.dmxzone.com/forum/topic.asp?TOPIC_ID=30693&FORUM_ID=7&CAT_ID=5&Topic_Title=Upload%2Fresize%2D+Pass+to+next+page+and+show+image&Forum_Title=ASP

You could filter the recordset on the confirmation page to show the most recent record using the MAX keyword
SELECT MAX(myID) as LastID
FROM myTable
However should you have 2 people submit almost simultaneously then it is possible that one user would not see the correct details.
@IDENTITY works better because it is associated with the record being inserted.

Tom Muck has an extension similar to InsertWithIdent that I mentioned in your other post,
www.tom-muck.com/extensions/help/insertretrieve/ the 'tutorial' that accompanies it explains what's going on and that <i>might</i> help clarify things for you.
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>I am using Dreamweaver MX ASP- I rarely handcode. I am using your products for this <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
I wouldn't be afraid of a bit of hand-coding - George's InsertWithIdent does require a bit of hand-coding, but I think I have a helpful tutorial on that at home.
If you get stuck with your code there are plenty of good people on the forums that will help you work out what's going on there.

Live the life you love
Love the life you live

Simon
<i>Please fix the width issue, pretty please someone</i>

Edited by - ganseki on 31 Jan 2005 18:54:47
Replied 31 Jan 2005 19:26:38
31 Jan 2005 19:26:38 David Ortiz replied:
I bought his server behavior.

I am trying now- 12.00 is not bad at all!! I'm going to give it my best try.

This Server Behavior is similar to the standard Insert Record Server Behavior, but this one will allow you to specify a variable name or Session variable name in which to place the MS Access Autonumber column value of the newly inserted record.
This SB works in ASP VBScript and JScript in DW MX only.
ADDED IN V. 1.1.0: A new server behavior that will retrieve the Identity value from a SQL Server database for ASP/VBScript only.

Access this extension by choosing:
Server Behaviors &gt;&gt; Basic-UltraDev &gt;&gt; Insert-Retrieve ID

________________________________________________________

Dreamweaver MX, ASP, Access DB.

i Rarely handcode- I use your products. I am a visual person and I can't seem to understand the SQL yet. I understand ASP- I think.. I've been doing this for 10 years and I haven't had to hand code yet- LOL.
Replied 31 Jan 2005 19:31:55
31 Jan 2005 19:31:55 David Ortiz replied:
I can't believe that I bought this and it won't work.

It throws an error: www.voila.us/error2.gif

What is this all about?

It doesn't work with Dreamweaver MX? TOTALLY NOT FAIR. Should I ask for my money back?

______________

Dreamweaver MX, ASP, Access DB.

i Rarely handcode- I use your products. I am a visual person and I can't seem to understand the SQL yet. I understand ASP- I think.. I've been doing this for 10 years and I haven't had to hand code yet- LOL.
Replied 31 Jan 2005 20:12:47
31 Jan 2005 20:12:47 Chris Charlton replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>I can't believe that I bought this and it won't work.

It throws an error: www.voila.us/error2.gif

What is this all about?

It doesn't work with Dreamweaver MX? TOTALLY NOT FAIR. Should I ask for my money back?<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Email the creator, check his forums out (if there are some).
Replied 31 Jan 2005 20:44:30
31 Jan 2005 20:44:30 David Ortiz replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>I can't believe that I bought this and it won't work.

It throws an error: www.voila.us/error2.gif

What is this all about?

It doesn't work with Dreamweaver MX? TOTALLY NOT FAIR. Should I ask for my money back?<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Email the creator, check his forums out (if there are some).
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>


Can ANYONE ELSE HELP?

These extensions add up to a lot of money and I am not getting help from DMXZONE.COM.

This is not fair.


_______________________________
My Signature is below
________________________________
Dreamweaver MX, ASP, Access DB.

i Rarely handcode- I use your products. I am a visual person and I can't seem to understand the SQL yet. I understand ASP- I think.. I've been doing this for 10 years and I haven't had to hand code yet- LOL.
Replied 31 Jan 2005 21:41:30
31 Jan 2005 21:41:30 David Ortiz replied:
He is giving my money back and stated that the extension you referred me to purchase is not used for that purpose.

Can ANYONE ELSE HELP?

I bought these extensions from DMXZONE.COM AND GEORGE IS NOT HELPING ME.

That error message displayed is not from his extension- It is from DMXZONE.COM's EXTENSION. It shows an extension called "InsertRecordWithIdent".

THis is 3 times that I get extensions that do not work.

Anyone responding??

Please??


_______________________________
My Signature is below
________________________________
Dreamweaver MX, ASP, Access DB.

i Rarely handcode- I use your products. I am a visual person and I can't seem to understand the SQL yet. I understand ASP- I think.. I've been doing this for 10 years and I haven't had to hand code yet- LOL.
Replied 01 Feb 2005 13:30:30
01 Feb 2005 13:30:30 Simon Martin replied:
There are some well documented issues with the InsertRecordWithIdent extension, the NewmanZone link has a step by step guide to fixing the javascript link problem
dmxzone.com/ShowDetail.asp?NewsId=4023
www.newmanzone.com/forum/topic.asp?TOPIC_ID=3

This tutorial - though aimed at SQL Server - shows how to use the tutorial to retrieve the ID and use it on another page.
dmxzone.com/ShowDetail.asp?NewsId=3044

If you could check each part of the process and make sure that each part on its own works then we can look at how to combine them successfully.
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> He is giving my money back and stated that the extension you referred me to purchase is not used for that purpose<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>Tom Muck has an extension similar to InsertWithIdent that I mentioned in your other post,
www.tom-muck.com/extensions/help/insertretrieve/ the 'tutorial' that accompanies it explains what's going on and that might help clarify things for you. <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Live the life you love
Love the life you live

Simon

Reply to this topic