DwZone Forum DwZone Forum
Welcome to the DwZone-it Forum
 
  FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  
    RegisterRegister -->   LoginLogin  
Asp Upload and Resize  
DwZone Forum Index -> Asp Upload and Resize

Moderators: AdministratorsModerators 
Hint: For improved responsiveness, use Internet Explorer 4 (or above) with Javascript enabled, choose 'Dynamic' from the View dropdown and hit 'Set Options' to save your changes.
New Topic Search for
 View     Per page     Messages Since 
Messages 411 to 420 of 860 (Total: 366) First |  Prev |  Next |  Last  
 Subject Author Date  
   Status Bar - The page cannot be found  
View this persons public profile  [email protected]   18:21 11 Apr 2008  
   Re:Status Bar - The page cannot be found  
View this persons public profile  gianluigi   0:15 12 Apr 2008  
   TRIM string value  
View this persons public profile  [email protected]   10:25 7 Apr 2008  
   Re:TRIM string value  
View this persons public profile  gianluigi   8:42 8 Apr 2008  
   Re:TRIM string value  
View this persons public profile  [email protected]   14:08 8 Apr 2008  
   Re:TRIM string value  
View this persons public profile  gianluigi   10:08 9 Apr 2008  
   Improvements in version 2.4.4  
View this persons public profile  [email protected]   2:28 13 Mar 2008  
   Re:Improvements in version 2.4.4  
View this persons public profile  gianluigi   3:10 13 Mar 2008  
    No adding to database  
View this persons public profile  [email protected]   3:12 24 Feb 2008  
 
I have the following upload doc. The upload function works all right but the is no record adding til the database.

At the 'insert Record Upload' server behavior there is a red exclamation mark...

How come, please?

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="dwzUpload/DefineVariable.asp" -->
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers=""
MM_authFailedURL="login.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
If (true Or CStr(Session("MM_UserAuthorization"))="") Or _
(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
<!--#include file="Connections/gadeplanDB.asp" -->
<%
'*********************************
'* *
'* INSERT RECORD AND UPLOAD *
'* http://www.DwZone-it.com *
'* *
'*********************************
server.ScriptTimeout = 5400

Dim RG_altVal, RG_columns, RG_Cong, RG_dbValues, RG_dbValuesTmp, RG_delim, RG_editCmd, RG_editQuery, RG_editQueryTmp, RG_emptyVal, RG_Ext, RG_Extensions, RG_fields, RG_FieldValueTmp, RG_FileDel, RG_FileExt, RG_formVal, RG_FS, RG_i, RG_L, RG_Len, RG_Max, RG_Name, RG_New, RG_newName, RG_Num, RG_Path, RG_Rec, RG_ret, RG_Save, RG_tableValues, RG_tableValuesTmp, RG_tst, RG_typeArray, RG_z, UploadStatus, NumFile
Dim RG_Connection, RG_editColumn, RG_recordId, Form, editAction, editRedirectUrl, RG_Files, RG_formName, UploadType, ParamVal, ParamList, MaxFieldNumber, TmpVal, x, y, Key, ProgressBar, newFileName
Dim tmpField_Name(), tmpValue_Name(), tmpField_Size(), tmpValue_Size(), tmpField_Thumb(), tmpValue_Thumb(), QtyRecord, TotalFileSize, valueToRedirectSend

Set Form = New ASPForm
Dim UploadID
UploadID = Form.NewUploadID
ProgressBar = "LittleBar2"
TotalFileSize = ""
editRedirectUrl = "adminnyhederliste.asp"
RG_Connection = MM_gadeplanDB_STRING
RG_editTable = "news"
RG_Files = "/pictures/;1;;;;0;picture;3;;;;0;;;;;1;;1;file1@_@_@1@_@_@0@_@_@0;150;;80;-1;;;80;0;_small;-1;0;0;;;80;0;_small;0@_@_@./@_@_@GET"
RG_formName = "form1"
UploadType="Insert"
UploadStatus = ""
valueToRedirectSend = "createdate"
NumFile = 0

if len(Request.QueryString("UploadID"))>0 then
Form.UploadID = Request.QueryString("UploadID")
end if

if (Request.QueryString <> "") Then
editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) & "?" & Request.QueryString & "&UploadID=" & UploadID
else
editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) & "?UploadID=" & UploadID
End If

Const fsCompletted = 0

If Form.State = fsCompletted Then
if Form.State = 0 then

Set ParamVal = CreateObject("Scripting.Dictionary")
tmp = split(RG_Files,"@_@_@")
ParamList = split(tmp(0),"|")
MaxFieldNumber = ubound(ParamList)
for x=0 to Ubound(ParamList)
TmpVal = Split(ParamList(x),";")
for y=0 to ubound(TmpVal)
Key = right("00" & cstr(x),3) & cstr(y)
ParamVal.add Key, TmpVal(y)
next
next
Form.Files.Save

RG_fieldsStr = "header|value|description|value|createdate|value|deletedate|value|picture|value"
RG_columnsStr = "header|',none,''|description|',none,''|createdate|',none,NULL|deletedate|',none,NULL|picture|',none,''"
Form.Files.DataBaseInsert

response.write(getRedirect())
response.end
End If
ElseIf Form.State > 10 then
response.write "<br><Font Color=red>Some form error.<br>Error code: " & Form.State & "<br>Error List:<br>0 Form was successfully processed. <br>1 Request method is NOT post <br>2 Zero length request (there are no data in a source form) <br>3 Form is in a middle of process. <br>5 Initial form state <br>11 Boundary of multipart/form-data is not specified. <br>12 Unknown source form (Content-type must be multipart/form-data) <br>15 Client was disconnected before upload was completted.<br>16 Unexpected error from Request.BinaryRead method (ASP error).<br></Font><br>"
End If


function GetFolderName(str): GetFolderName = Ris : end function

function myGetFileName(str): myGetFileName = Ris : end function
%>
<%
Dim nyheder
Dim nyheder_cmd
Dim nyheder_numRows

Set nyheder_cmd = Server.CreateObject ("ADODB.Command")
nyheder_cmd.ActiveConnection = MM_gadeplanDB_STRING
nyheder_cmd.CommandText = "SELECT * FROM news"
nyheder_cmd.Prepared = true

Set nyheder = nyheder_cmd.Execute
nyheder_numRows = 0
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/controlpanel.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>:::: GADEPLAN ::::</title>
<!-- InstanceEndEditable -->
<link href="styles.css" rel="stylesheet" type="text/css" />
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>

<body>
<!-- DO NOT MOVE! The following AllWebMenus linking code section must always be placed right AFTER the BODY tag-->
<!-- ******** BEGIN ALLWEBMENUS CODE FOR adminmenu ******** -->
<script type="text/javascript">var MenuLinkedBy="AllWebMenus [4]",awmMenuName="adminmenu",awmBN="724";awmAltUrl="";</script><script charset="UTF-8" src="adminmenu.js" type="text/javascript"></script><script type="text/javascript">awmBuildMenu();</script>
<!-- ******** END ALLWEBMENUS CODE FOR adminmenu ******** -->


<table width="748" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#7E5600">
<tr>
<td id="awmAnchor-adminmenu"><a href="forside.asp"><img src="grafik/top.jpg" width="748" height="201" border="0" /></a></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td valign="top"><!-- InstanceBeginEditable name="EditRegion3" -->
<p class="header1">Opret nyheder</p>
<form onsubmit="return ProgressBar()" action="<%=editAction%>" method="post" enctype="multipart/form-data" name="form1" id="form1">
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100" height="30" class="normaltext">Overskrift:</td>
<td height="30" ><input name="header" class="normaltext" type="text" id="header" size="65" /></td>
</tr>
<tr>
<td width="100" height="30" valign="top" class="normaltext">Beskrivelse:</td>
<td height="30" class="normaltext"><textarea name="description" class="normaltext" id="description" cols="65" rows="5"></textarea></td>
</tr>
<tr>
<td width="100" height="30" class="normaltext">Oprettet:</td>
<td height="30" class="normaltext"><input name="createdate" class="normaltext" type="text" id="createdate" size="15" /></td>
</tr>
<tr>
<td height="30" class="normaltext">Slettedato:</td>
<td height="30" class="normaltext"><input name="deletedate" class="normaltext" type="text" id="deletedate" size="15" /></td>
</tr>
<tr>
<td height="30" class="normaltext">Billede:</td>
<td height="30" class="normaltext"><input name="file1" type="file" id="file1" onchange="dwz_setEvent(this,'change')" onclick="dwz_setEvent(this,'click')" size="40" /> </td>
</tr>
<tr>
<td height="30" class="normaltext">�</td>
<td height="30" class="normaltext"><input name="picture" class="normaltext" type="text" id="picture" size="30" /></td>
</tr>
<tr>
<td height="30" class="normaltext">�</td>
<td height="30" class="normaltext"><input type="submit" name="button" id="button" value="Opret" /></td>
</tr>
</table>
</form>
<p class="normaltext">�</p>
<p class="style4">�</p>
<!-- InstanceEndEditable --></td>
</tr>

</table> </td>
</tr>
<tr>
<td bgcolor="#7E5600"><div align="center">
<p class="style2"><br />
<span class="bund">GADEPLAN - Jemteplandsgade 3 - 2300 Kobenhavn S - Tlf. 12 34 56 78 - <a href="mailto:[email protected]" class="bund">[email protected]</a><br />
</span><br />
</p>
</div></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
<!--#include file="dwzUpload/Upload.asp" -->
<!--#include file="dwzUpload/UploadAdvanced.asp" -->
<!--#include file="dwzUpload/Resize.asp" -->
<%
nyheder.Close()
Set nyheder = Nothing
%>

 
Reply to this current thread  View this persons public profile  Send Private Message
   Re:No adding to database  
View this persons public profile  gianluigi   6:54 26 Feb 2008  
Last Visit: Wednesday 25 Dec, 2024 7:23 pm First |  Prev |  Next |  Last  
 Login
Username:  Password:    
Read Message Read Message   Unread message Unread message
Read message [popular] Read message [popular]   Unread message [popular] Unread message [popular]
Read message [locked] Read message [locked]   Unread message [locked] Unread message [locked]
All times are GMT-1

Jump to: