Hoy!
Jag hämtar upp data ur ett formulär med följande kod:
formulär=namn & id, t.ex:
<input type="text" value="test" name="1">
<input type="hidden" value="13" name="1">
for each f in Request.Form
f1 = f1 & Request.Form(f) & ","
next
arrf1 = Split(f1,",")
for a = 0 TO UBound(arrf1)
if arrf1(a)<>"" Then '<-- funkar ej!
oConn.Execute("UPDATE tabell SET sName='" & arrf1(a) & "' WHERE id=" & arrf1(a+1))
a = a + 1
end if
next
...om nån av inputrutorna är tom får jag fel:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-4.0.21-nt]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
hur ska man kolla om nån del i arrayen är tom?