ma è questo l'errore
che da explorer
comunque il codice è questo:
codice:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Response.charset="utf-8"%>
<%
Set rsMarche = Server.CreateObject("ADODB.RecordSet")
sql = "SELECT * FROM Marche ORDER By Marche Asc"
rsMarche.Open sql, Conn, 3, 3
%>
<%
Set rsAlimentazioni = Server.CreateObject("ADODB.RecordSet")
sql = "SELECT * FROM Alimentazioni ORDER By Alimentazioni Asc"
rsAlimentazioni.Open sql, Conn, 3, 3
%>
<%
Set rsCategorie = Server.CreateObject("ADODB.RecordSet")
sql = "SELECT * FROM Categorie ORDER By Categorie Asc"
rsCategorie.Open sql, Conn, 3, 3
%>
<%
Set rsStati = Server.CreateObject("ADODB.RecordSet")
sql = "SELECT * FROM Stati ORDER By Stati Asc"
rsStati.Open sql, Conn, 3, 3
%>
<%
If Request.QueryString("Save")="1" then
Dim oUpload
Set oUpload = new cUpload
oUpload.AutoRename = True
oUpload.Overwrite = False
oUpload.SetPath "files\" 'Impostazione del percorso
oUpload.Load
While Not oUpload.EOF
oUpload.Save()
Select Case lCase(oUpload.Files("InputName"))
Case "img"
FileName_img = oUpload.GetFileName()
Case "img1"
FileName_img1 = oUpload.GetFileName()
Case "img2"
FileName_img2 = oUpload.GetFileName()
End Select
oUpload.MoveNext
Wend
'Set Conn = Server.CreateObject("ADODB.Connection")
'Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("../mdb-database/solaut.mdb")
Set Rs=server.CreateObject("ADODB.Recordset")
Rs.Open "Automobili",Conn,3,3
Rs.AddNew
Rs("IdMarche") = oUpload.Form("Marche")
Rs("IdAlimentazioni") = oUpload.Form("Alimentazioni")
Rs("IdCategorie") = oUpload.Form("Categorie")
Rs("IdStati") = oUpload.Form("Stati")
Rs("Modello") = oUpload.Form("Modello")
Rs("Immatricolazione") = oUpload.Form("Immatricolazione")
Rs("Prezzo") = oUpload.Form("Prezzo")
Rs("Km") = oUpload.Form("Km")
Rs("Descrizione") = oUpload.Form("Descrizione")
Rs("img") = FileName_img
Rs("img1") = FileName_img1
Rs("img2") = FileName_img2
Rs.update
Rs.Close
Set Rs = Nothing
End if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Gestione</title>
</head>
<body>
<FORM ACTION="?save=1" METHOD="Post" enctype="multipart/form-data">
<table width="80%" border="1" align="center">
<tr>
<td colspan="2" align="center" class="big">Inserimento Auto</td>
</tr>
<tr>
<td width="50%"> </td>
<td width="50%"> </td>
</tr>
<tr>
<td>Marca: </td>
<td><input type="text" name="marca" id="marca"></td>
</tr>
<tr>
<td>Alimentazione:</td>
<td><input type="text" name="alimentazione" id="alimentazione"></td>
</tr>
<tr>
<td>Categoria:</td>
<td><input type="text" name="categoria" id="categoria"></td>
</tr>
<tr>
<td>Stato:</td>
<td><input type="text" name="stato" id="stato"></td>
</tr>
<tr>
<td>Modello:</td>
<td><label>
<input type="text" name="Modello" id="Modello">
</label></td>
</tr>
<tr>
<td>Immatricolazione:</td>
<td><label>
<input type="text" name="Immatricolazione" id="Immatricolazione">
</label></td>
</tr>
<tr>
<td>Prezzo:</td>
<td><label>
<input type="text" name="Prezzo" id="Prezzo">
</label></td>
</tr>
<tr>
<td>Chilometri:</td>
<td><label>
<input type="text" name="Km" id="Km">
</label></td>
</tr>
<tr>
<td>Immagine 1:</td>
<td><input type="file" name="img" /></td>
</tr>
<tr>
<td>Immagine 2:</td>
<td><input type="file" name="img1" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="2" align="center"><INPUT NAME="Enter" TYPE="Submit" value="Inserisci"></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="2" align="center">Amministrazione</td>
</tr>
</table>
</FORM>
</body>
</html>
<%
rsMarche.Close
Set rsMarche = Nothing
rsAlimentazioni.Close
Set rsAlimentazioni = Nothing
rsCategorie.Close
Set rsCategorie = Nothing
rsStati.Close
Set rsStati = Nothing
Conn.Close
Set Conn=Nothing
Set oUpload = Nothing
%>
Io non devo prendere dati da un database (marca, cat, aliment.) scrivo tutto a mano serve soltanto da inserimento..
come devo fare...
non uso connessione sql... non lo so fare..