Yes, I have cut and pasted their code, however I am so new at this, and
frontpage adds a special twist with the DB Wizzard. I am doing something
wrong. I have defined a database via the database wizzard named
fpdb/aspupload.mdb with the correct data fields. I'm not sure of a few
things:
Is ODBC the correct connection method? they also give ADO examples
The file name "THEFILES" - i haven't defined this in frontpage anywhere is
it just taking the input from my input screen odbc.asp? It looks like they
have defined it in access as a file on the table.
Is the connection statement correct?
There are SQL Statements to insert to the SQL = "INSERT INTO MYIMAGES what
is MYIMAGES? I also haven't defined that anywhere in frontpage.
Sorry for the level of ineptness. Here are the two .asp ODBC.ASP and
ODBC_UPLOAD.ASP
I would greatly apprecitate any help.
ODBC.ASP
<HTML>
<BODY BGCOLOR="#FFFFFF">
<h3>Saving Files in the Database via ODBC</h3>
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="odbc_upload.asp">
File:<BR><INPUT TYPE=FILE NAME="THEFILE"> <P>
Description:<BR><TEXTAREA NAME="DESCR"></TEXTAREA><BR>
<INPUT TYPE=SUBMIT VALUE="Upload!">
</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>
###### SECOND UPDATE ASP
ODBC_UPload.asp
<HTML>
<BODY>
<%
Set Upload = Server.CreateObject("Persits.Upload.1")
' Capture files
Upload.Save "c:\upload"
' Obtain file object
Set File = Upload.Files("THEFILE")
'If Not File Is Nothing Then
' Build ODBC connection string
Connect = "DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=URL=fpdb/aspupload.mdb"
' If you use SQL Server, the connecton string must look something like this:
' Connect = "Driver=SQL Server;Server=MYSRV;Database=master;UID=sa;PWD=xxx"
' Build SQL INSERT statement
SQL = "INSERT INTO MYIMAGES(image_blob, filename, description, filesize)
VALUES(?, '"
SQL = SQL & File.Filename & "', '"
SQL = SQL & Replace(Upload.Form("DESCR"), "'", "''") & "', "
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>
:
The ASupload manual give you the instructions
See
http://www.aspupload.com/manual_db.html
_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
_____________________________________________
| Hello, I have a form with multiple data elements and up to six files. On a
| simple test I can get the files up to my computer! Great. Now I am trying
| to get the form data to my database.
|
| I have a .mdb defined and simply want to populate the fields.
|
| I am very new at this so I am not sure exactly what to do.
|
| This should be an easy one for someone.

but it's killing me.
|