Reply
aspsmartupload tutorial
Old 01-18-2007, 02:28 PM aspsmartupload tutorial
Experienced Talker

Posts: 39
Name: Rob
im haveing trounle with a tutorial can anyone help my first page has my form

<!-- AspUpload Code samples: odbc.asp -->
<!-- Saving files in the database via ODBC -->
<!-- Copyright (c) 2001 Persits Software, Inc. -->
<!-- http://www.persits.com -->

<HTML>
<BODY BGCOLOR="#FFFFFF">

<h3> </h3>
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="odbc_upload.asp">
<h3>Saving Files in the Database via ODBC<br>
<input name="image_main" type=FILE id="image_main" size="30">
</h3>
<h3>
<input name="image_small" type="file" id="image_small" size="30">
</h3>
<h3><br>
<input name="image_thumb" type="file" id="image_thumb" size="30">
<br>
<input type=SUBMIT value="Upload!">
</h3>
</FORM>

<P>
If you get the error <I><FONT COLOR="#FF0000">[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query</FONT></I>,
adjust permissions on the file <B>\Samples\04_db\aspupload.mdb</B> with Windows Explorer.
</BODY>
</HTML>

My second has the code for uploading

<%@LANGUAGE="VBSCRIPT"%><!-- AspUpload Code samples: odbc_upload.asp -->
<!-- Invoked by odbc.asp -->
<!-- Copyright (c) 2001 Persits Software, Inc. -->
<!-- http://www.persits.com -->

<HTML>
<BODY>

<%
Set Upload = Server.CreateObject("Persits.Upload")

' Capture files
Upload.Save "C:\Documents and Settings\Robert Dalton\Desktop\website\starsearchentertainment.com \images\musicians"

' Obtain file object
Set File = Upload.Files(image_main, image_small, image_thumb)

If Not File Is Nothing Then
' Build ODBC connection string
Connect = "Driver=SQL Server;Server=win10.cmmwebhosting.com;Database=sta rsearch.mdb;UID=robdalto;PWD=starry456"

' If you use SQL Server, the connecton string must look something like this:
' Connect = "Driver=SQL Server;Server=MYSRV;Database=starsearch.mdb;UID=ro bdalton;PWD=starry456"

' Build SQL INSERT statement
SQL = "INSERT INTO Artisttable(image_main, image_small, image_thumb) VALUES(?, '"
SQL = SQL & File.Filename & "', '"
SQL = SQL & Replace(Upload.Form("formup"), "'", "''") & "', "
SQL = SQL & File.Size & ")"

' Save to database
File.ToDatabase Connect, SQL
Response.Write "File saved."
Else
Response.Write "File not selected."
End If
%>

</BODY>
</HTML>
cna anyone help?
starsearch is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 01-19-2007, 09:21 AM Re: aspsmartupload tutorial
ExpressoDan's Avatar
Ultra Talker

Posts: 317
Name: This Space for Rent
Location: Georgia
What kind of error message. Cant really help if we dont know what's happening.

Quick glance, this line might be the issue.
Upload.Save "C:\Documents and Settings\Robert Dalton\Desktop\website\starsearchentertainment.com \images\musicians"

You need to be running IIS for this to work.
__________________
Daniel
"I think therefore I am, I think." <!-- George Carlin
ExpressoDan is offline
Reply With Quote
View Public Profile Visit ExpressoDan's homepage!
 
Old 01-19-2007, 09:31 AM Re: aspsmartupload tutorial
Experienced Talker

Posts: 39
Name: Rob
Quote:
Originally Posted by ExpressoDan View Post
What kind of error message. Cant really help if we dont know what's happening.

Quick glance, this line might be the issue.
Upload.Save "C:\Documents and Settings\Robert Dalton\Desktop\website\starsearchentertainment.com \images\musicians"

You need to be running IIS for this to work.
does this line have to be C:\Inetpub\wwwroot\website\starsearchentertainment .com\images\musicians
thats where my files are held on my local host. I keep getting a message


Persits.Upload.1error '800a003d'
Wrong Content-Type. Make sure you have included the attribute ENCTYPE="multipart/form-data" in your form. /odbc_upload.asp, line 13

line 13 is that line you were talking about i changed it to the other address but i still get the same message
starsearch is offline
Reply With Quote
View Public Profile
 
Old 01-19-2007, 03:54 PM Re: aspsmartupload tutorial
ExpressoDan's Avatar
Ultra Talker

Posts: 317
Name: This Space for Rent
Location: Georgia
From my experience with persist, this is an ambiguous error message.

First of all, I see a space in the file name. This is the path that you are saving the files too. Second, ensure that the IUSR_MACHINENAME has write access to this folder.
right click folder >> select properties >> click security tab and look to see what the IUSR has
__________________
Daniel
"I think therefore I am, I think." <!-- George Carlin
ExpressoDan is offline
Reply With Quote
View Public Profile Visit ExpressoDan's homepage!
 
Old 01-19-2007, 06:58 PM Re: aspsmartupload tutorial
Experienced Talker

Posts: 39
Name: Rob
Quote:
Originally Posted by ExpressoDan View Post
From my experience with persist, this is an ambiguous error message.

First of all, I see a space in the file name. This is the path that you are saving the files too. Second, ensure that the IUSR_MACHINENAME has write access to this folder.
right click folder >> select properties >> click security tab and look to see what the IUSR has
its not like that in my code i went to the folder right clicked and changed to write. and share this folder its still showing the same error message have i got the right file path my files are online im trying to store to.
starsearch is offline
Reply With Quote
View Public Profile
 
Old 01-20-2007, 01:30 PM Re: aspsmartupload tutorial
Experienced Talker

Posts: 39
Name: Rob
Come on folks there must be one person that knows how it works
starsearch is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to aspsmartupload tutorial
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.67767 seconds with 12 queries