473,581 Members | 2,497 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Persist Upload Hatasi Yardim Lütfen

Sitelerden birinde verilen yabancı kaynakli bir scriptti duzenledim
yanlız birseyin içinden bir turlu cıkamadım işin aslı ilk defa
persistin upload componentini kullanacam yanlız suanki haliyle
verdiği hata şu.Bilen arkadaşlar lütfen yardım edin

Persits.Upload. 1 error '800a0020'

The system cannot find the path specified.

/classifieds/upload.asp, line 250

sistem dosya yolunu bulamadı.

2 dosyam var
Birinde baglantıların yolunu belirleyen inc_conn.asp
ve upload.asp

inc_conn.asp ' nin içeriği
<!-- METADATA TYPE="typelib"
FILE="C:\Progra m Files\Common
Files\System\ad o\msado15.dll" -->

<%
'============== =============== =============
'CONFIGURATIONS
'============== =============== =============

'DATABASE
'enter 1=DEFAULT SETTING (DATABASE IN db/ folder)
'enter 2=DATABASE IS OUTSIDE CLASSIFIED ADS db/ FOLDER (THEN EDIT THE
DATABASE PATH BELOW)
'enter 3=DSN
'enter 4=SQL SERVER
strDatabaseFile = 1

'IF ABOVE YOU ENTERED 2
'DEFINE DATABASE PATH (ie c:\inetpub\wwwr oot\classifieds \db)
'If you don't intend to use the default path
'Contact your host if you don't know it
'IMPORTANT---FOLDER MUST HAVE A WRITE PERMISSION (CONTACT YOUR HOST FOR
INFO)
'remove the ' in the beginning of the line to activate

'strDatabasePat h =
"d:\webspace\re sadmin\bogazici konut\bogazicik onut.com.tr\www \classifieds\"

'THE ABSOLUTE PATH TO YOUR CLASSIFIED ADS FOLDER
'Change the Classifieds to directory name if you use another name
strAbsolutePath =
"d:\webspace\re sadmin\bogazici konut\bogazicik onut.com.tr\www \classifieds\"

'SITE NAME
strSiteName = "bogazicikonut. com.tr!"

'DOMAIN EMAIL where user can contact you (Used only in the footer of
every pages)
strInfoEmail = "we*******@boga zicikonut.com.t r"
'UPLOAD-----------------------------

'PHOTO UPLOAD 1=YES 0=NO
UploadOption = 1

'IF UPLOAD = 1 THEN SPECIFY FOLDER (if you use the default folders,
there is no need to edit)
'---FOLDER MUST HAVE A WRITE PERMISSION (CONTACT YOUR HOST FOR INFO)
strUploadFolder =
"d:\webspace\re sadmin\bogazici konut\bogazicik onut.com.tr\www \classifieds\up loads"
strAbsUploadPat h = strCatUploadFol der

'IMAGES FOR CATEGORY 1=YES 0=NO ---WILL APPEAR FOR POSTED ADS ON MAIN
PAGE---
strCategoryImag e = 1
strCatUploadFol der =
"d:\webspace\re sadmin\bogazici konut\bogazicik onut.com.tr\www \classifieds\up loads"
strAbsCatUpload Path = strCatUploadFol der

'EMAIL----------------------------

'EMAIL OPTION 1=YES 0=NO ---ONLY IF YOUR SITE SUPPORT JMAIL or
ASPMAIL---
'This setting will overide all the others below
strSendEmail = 1

'IF EMAIL OPTION = 1 THEN SPECIFY MAIL COMPONENT
'OPTIONS = "JMAIL" or "ASPMAIL"
strMailComponen t = "ASPMAIL"

'IF EMAIL OPTION = 1 THEN SPECIFY MAIL SERVER
strMailServer = "bogazicikonut. com.tr"
strDomainEmail = "ad***@bogazici konut.com.tr"

'Path to your where you put the classified Ads folder (Used when mail
is sent to user)
strDomain = "www.bogaziciko nut.com.tr/classifieds"

'OPTIONAL EMAIL FUNCTIONS
'Will enable the lost password retrieval by email
strSendLostPass word = 1

'Will send registration info to new users
strSendNewUserI nfo = 1

'NOTIFY WEBMASTER 1=YES 0=NO ---NOTIFY BY EMAIL---

strNotifyNewAds = 1
strNotifyNewUse r = 1

strNameToWebmas ter = "Webmaster"
strSendToWebmas ter = "we*******@boga zicikonut.com.t r"

Select Case strDatabaseFile
case 1
strConn = "DRIVER={Micros oft Access Driver (*.mdb)};" & "DBQ=" &
Server.MapPath( "db\dbClassifie dsPhoto.mdb")

case 2
strConn = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" &
strDatabasePath & "dbClassifiedsP hoto.mdb; Persist security Info=False"
case 3
strConn = "dsn=dbclassifi edsphoto"

case 4
strConn = "Provider=SQLOL EDB;Data Source=Your_SQL _Server;Initial
Catalog=dbClass ifiedsPhoto; User Id=Your_Login_N ame;
Password=Your_P assword"
End Select

%>


Upload.asp nin içeriği


<%@LANGUAGE="VB SCRIPT"%>
<html>
<head>
<title><%=strSi teName%></title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<meta name="Microsoft Border" content="none">
</head>
<!-- #Include File="Inc_conn. asp" -->
<%
If Session("cAdmin UserName") = "" Then
If Session("UserID ") = "" Then
Response.Redire ct "Login.asp"
Else
If UploadOption = 0 Then
Response.Redire ct "MenuForRegiste redUsers.asp"
End If
End If
End If
dim strAction

strAction = CStr(Request.Qu eryString("acti on"))

Select Case strAction
Case "Categories "
Categories
Case "Ads"
Ads
Case ""
Response.redire ct ("main.asp")
End Select
%>

<body bgcolor="#fffff f" topmargin="0">
<%'-----------------------------------------------------------------
'--------------------------Upload Ads image Function ---------------
Sub Ads
%>
<div align="center">

<table width="80%" border="0" cellspacing="0" cellpadding="2" >
<tr>
<td>
<div align="center">
<h3><font face="Verdana, Arial, Helvetica, sans-serif">Upload
Picture</font></h3>
</div>
</td>
</tr>
<tr>
<td>
<div align="center">
<form name="form1" method="POST" enctype="multip art/form-data"
action="upload. asp?Upload=yes& Action=Ads&nAdI D=<%=Request("n AdID")%>">
<table width="80%" border="0" cellspacing="0"
cellpadding="2" >
<tr>
<td>Upload</td>
<td>
<input type="file" name="file1" size="20">
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input type="hidden" name="nAdId"
value="<%Reques t("nAdID")%>" >
<font size="2"><i>not e: only image files are allowed
and they may not
exceed 100KB, <br>
<br>
click the browse button to select your file, then
right-click
to see the file properties.</i></font></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input type="submit" name="action" value="Submit">
</td>
</tr>
</table>
</form>
</div>
</td>
</tr>
</table>
<%
strAdId = request("nAdID" )
if request("Upload ") = "yes" Then

'---------------Upload User Ads Images--------------------

Set Upload = Server.CreateOb ject("Persits.U pload.1")
Upload.SetMaxSi ze 100000, False
Upload.SaveVirt ual(strUploadFo lder)

' <!--bolViolators = False
' For Each File in Upload.Files
' If File.ImageType <> "GIF" and File.ImageType <> "JPG" Then
' bolViolators = True
' Exit For
'End If
'
' If File.ImageWidth > 250 Then
' bolViolators = True
' Exit For
' End If
'
' If File.ImageHeigh t > 250 Then
' bolViolators = True
' Exit For
' End If
'
' If File.ImageType = "GIF" Then
' strFileExtensio n = ".gif"
' else
' strFileExtensio n = ".jpg"
' End If
' Next

Set File = Upload.Files("F ILE1")
SaveFileName = strAdId & strFileExtensio n
File.CopyVirtua l SaveFileName
File.Delete

Set Upload = Nothing
'Now, if we didn't have any violating files, say so!
If Not bolViolators then
strSaveFileName = strAdId & strFileExtensio n
Response.Write "Upload Successful..."
Set rsUploadFile = Server.CreateOb ject("ADODB.Com mand")
rsUploadFile.Ac tiveConnection = strConn
rsUploadFile.Co mmandText = "UPDATE tblAds SET cFile = '" &
strSaveFileName & "' WHERE nAdId LIKE '" & strAdId & "'"
rsUploadFile.Ex ecute

Set rsUploadFile = Nothing
End if
%>
<% If Not bolViolators then %>
<p><img src="<%=strsave FileName%>" border="1" ><br>
<font face="Verdana, Arial, Helvetica, sans-serif"
size="2">Upload ed image<br>
To change, browse and resubmit the form above <br>
<a href="javascrip t:location.relo ad()"><font
color="#008000" >Refresh</font></a> the page to see new image<br>
</font> </p>
<p><font face="Geneva, Arial, Helvetica, san-serif" size="2"><a
href="modifyAds .asp?nUserId=<% =session("UserI D")%>"><font
color="#008000" >Continue</font></a></font><br>
</p>

<%
Else %>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Sorry,
there was an error<br>
The image is not a .GIF or a .JPG file or is bigger than 20KB<br>
Try again<br>
</font> </p>
<%
End if

End If
%>
<p>&nbsp;</p>
</div>
<% End Sub
'--------------------------------End Function Ads----------------------
%>
<%'-------------'Function Categories image upload for
Admin-----------------
Sub Categories
%>
<div align="center">
<table width="80%" border="0" cellspacing="0" cellpadding="2" >
<tr>
<td>
<div align="center">
<h3><font face="Verdana, Arial, Helvetica, sans-serif">Upload
Category Image</font></h3>
</div>
</td>
</tr>
<tr>
<td>
<div align="center">
<form name="form2" method="POST" enctype="multip art/form-data"
action="upload. asp?Upload=true &action=Categor ies&nCategoryID =<%=Request("nC ategoryID")%>">
<table width="80%" border="0" cellspacing="0"
cellpadding="2" >
<tr>
<td>Upload</td>
<td>
<input type="file" name="file1" size="20">
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input type="hidden" name="nCategory Id"
value="<%Reques t("nCategoryID" )%>">
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input type="submit" name="Submit" value="Submit">
</td>
</tr>
</table>
</form>
</div>
</td>
</tr>
</table>
<%
strCategoryId = "cat" & request("nCateg oryID")
strnCategoryId = request("nCateg oryID")
if request("upload ") = "true" Then

Set Upload = Server.CreateOb ject("Persits.U pload.1")
Upload.SetMaxSi ze 20000, False
Upload.Save strAbsUploadPat h

bolViolators = False
For Each File in Upload.Files
If File.ImageType <> "GIF" and File.ImageType <> "JPG" Then
bolViolators = True
Exit For
End If

If File.ImageWidth > 250 Then
bolViolators = True
Exit For
End If

If File.ImageHeigh t > 250 Then
bolViolators = True
Exit For
End If

If File.ImageType = "GIF" Then
strFileExtensio n = ".gif"
else
strFileExtensio n = ".jpg"
End If
Next

Set File = Upload.Files("F ILE1")
SaveFileName = strAbsCatUpload Path & strCategoryId & strFileExtensio n
File.Copy
"d:\webspace\re sadmin\bogazici konut\bogazicik onut.com.tr\www root\classified s\uploads\"
& File.FileName
File.Delete

Set Upload = Nothing

If Not bolViolators then
Response.Write "Upload Successful..."
strSaveFileName = strCatUploadFol der & strCategoryId &
strFileExtensio n
%>
<p><img src="<%=strsave FileName%>" border="1" ><br>
<font face="Verdana, Arial, Helvetica, sans-serif"
size="2">Upload ed image<br>
<%=strsaveFileN ame%><br>
<br>
To change, browse and resubmit the form above <br>
Refresh the page to see new image<br>
</font> </p>
<p><font face="Geneva, Arial, Helvetica, san-serif" size="2"><a
href="admincom. asp?View=Catego ries&Action=UPL OAD&nCategoryID =<%=strnCategor yID%>&CategoryI mage=<%=strSave FileName%>"><fo nt
color="#008000" >Continue</font></a></font><br>
</p>
<%

Else %>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Sorry,
there was an error<br>
The image is not a .GIF or a .JPG file or file is too big<br>
Try again<br>
</font> </p>

<%
End If
End If
%>
</Div>
<p>&nbsp;</p>
</body>
</html>

<%
End Sub
'---------------------------------------End Categories images
upload-------------------
%>

Feb 15 '06 #1
0 4744

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
11750
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a table in MySQL with the path & filename to the image. I have successfully uploaded and performed an update query on the database, but the problem...
2
2448
by: Sean Dotson | last post by:
I have a form that passes variables to an asp file and then uploads a file. For some reason the request.form is not getting the info from the form. It's returning blanks. Any insight would be appreciated.... Here is the asp file <HTML> <HEAD> <TITLE>File Upload Results</TITLE>
3
45954
by: news.rcn.com | last post by:
How can I access the request and response object for a page using javascript. I want to stick some data on with something like request.setAttribute( "User's choice for later use" ). I can't seem to find a reference to request or response objects in JavaScript either in Google Groups or O'Reilly's "JavaScript the Definitive Guide" (surely it...
4
10736
by: Alberto | last post by:
Could you tell me what it's for the "Persist Security Info ..." value in a connection string. Thank you.
2
2541
by: BH | last post by:
I developed a small web app using the FormsAuthentication class to set a cookie (FormsAuthentication.SetAuthCookie(value, isPersist)). The cookie persists fine on my local PC when "isPersist" is true and I can see the cookie file in the cookies folder on my disk. However, after I migrated the application to a server, the cookie is no longer...
1
5427
by: Paul Perot | last post by:
Hi All: I have a DataTable that I have defined Globally. I populate this datatable dynamically with file/folder information that I read directly from the server. I use this datatable information to bind mainly to a DataGrid, but I would also like it to persist for the duration that I have a particular page open. I seem to be losing this...
4
3813
by: Grey | last post by:
how can I persist the data input in the textbox which the Textmode = Password after postback?? I found that when I set the Textmode in textbox to PASSWORD, i cannot persist the data within the textbox after postback...is there any way to fulfil my req??
3
4551
by: Dave Adler | last post by:
Is there any way to retain the value of an HtmlInputFile control through a postback? I do some server side validation on the page when it is submitted and if an error occurs on the page the HtmlInputFile control value is blank after the postback. The EnableViewState for the control is set to true. I can't put the postedFile.filename value...
5
1879
by: senol | last post by:
UPLOAD bu class public static void ResimYükle(HtmlInputFile HtmlInput, string id,string Klasor,string KatID) { string path_file;
0
7868
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8149
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8304
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8175
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6553
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5364
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3827
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1138
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.