Jag skulle vilja ha en ifsats som gör att om ett fält inte är ifyllt så ska ingenting göras, som det är nu så skrivs filnamnet i databasen över med ingenting om man lämmnar detta fält tomt.
Så jag täntke en IF sats som går såhär ungefär:
'Declare all local variables
dim conn
dim rs
dim strID
dim strconn
'set a local variable to my DSN-less connection String
strconn = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=C:\data\WebData\katalog.mdb;"
'Create the Connection object
set conn = server.createobject("adodb.connection")
conn.open strconn
'Create the recordset object
set rs = server.createobject("adodb.recordset")
'This statement opens the table so we can add a record notice the addnew
'The 2, 2 is how the table is opened there are many ways it can be opened
SQL = "SELECT * from Kat WHERE ID = " & mySmartUpload.Form("ID") & ""
rs.open sql, conn, 2, 2, adCmdText
'Set the table column = to my input text box from my form
rs("Filename") = mySmartUpload.Files.Item(1).FileName
rs("produktbild") = mySmartUpload.Files.Item(2).FileName
rs.update
'Always! Always set your objects to nothing. This clears them out of servers memory
'Your network admins will like this
%>
------------------
His Divine Shadow is the most despicable being ever created, short and to the point.