View Single Post
  #3 (permalink)  
Old April 28th, 2005, 12:49 PM
SKE SKE is offline
Authorized User
 
Join Date: Mar 2005
Location: , , .
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

HEY, if I use the "file" type in my form I receive an error in the line referring to my third string. The string I'm referring to is the "strIdArtista" one.
Is that I have to change type of record or something ?!
I think that using the "file" type in the form, it doesn't send the name of the file but tries to send the entire file !

This is my script : (strIdArtista IS THE FILE ONE, the other two are just plain text)

<%
dim strTitolo
strTitolo = request.form("titolo")

dim strArtista
strArtista = request.form("artista")

dim strIdartista
strIdartista = request.form("idartista")

dim strCode
strCode="innovatel"

Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("exhibitions.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn

sql = "SELECT * FROM exhibitions"

Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3

rs.addnew
rs(1) = strTitolo
rs(2) = strArtista
rs(3) = strIdartista
rs.update

Response.Write "<html>"
Response.Write "Complimenti. Hai inserito la mostra " & strTitolo & "<br>"
Response.Write "dell'artista " & strArtista & "<br>"
Response.Write "con ID " & strIdartista & "<br>"
Response.Write "</html>"

rs.Close
set rs = Nothing




THANKS A LOT TO ANYONE WHO CAN HELP !