by Andrew Johnstone
Theres always something to learn, and a couple things i’ve learnt recently.
MS Access does not support multiple querys as in the following…
ID=Request.Form(TableKeyIDName) SQL = "" SQL = SQL & "INSERT INTO MetaData " & VBCRLF SQL = SQL & " (Fid, IndexKey, IndexValue) " & VBCRLF SQL = SQL & "VALUES " & VBCRLF For i=1 To Request.Form("AssociateDataKey").Count If (Request.Form("AssociateDataKey") <> EMPTY) Then SQL = SQL & " ( " & VBCRLF SQL = SQL & " " & CInt(ID) & ", " & VBCRLF SQL = SQL & " '" & Request.Form("AssociateDataKey")(i) & "', " & VBCRLF SQL = SQL & " '" & Request.Form("AssociateDataValue")(i) & "' " & VBCRLF SQL = SQL & " ) " If (Request.Form("AssociateDataKey").Count <> i) Then SQL = SQL & ", " & VBCRLF End If End If NextThe Query:
INSERT INTO MetaData (Fid, IndexKey, IndexValue) VALUES ( 18, 'a', 'a' ), ( 18, 'b', 'b' ), ( 18, 'c', 'c' ), ( 18, 'd', 'd' ), ( 18, 'e', 'e' );The Error:
Error Type:
Microsoft JET Database Engine (0×80040E14)
Missing semicolon ( at end of SQL statement.
/admin/example/Submit.asp, line 84
The wildcard for MS Access is ‘*’ not ‘%’.
where (
A.TITLE like '*criteria1*'
or A.SUBTITLE like '*criteria1*'
or A.ABSTRACT like '*criteria1*'
or A.CONTENT like '*criteria1*'
)
and (
A.category = 937
or A.date_added >= '2005-01-01'
)
and a Handy App…
Also, i’d just like to thank Eric for pointing out a nice app to mount ISO’s; a very handy little application.
Andrew Johnstone is a software engineer / lead developer working at Everlution Software.
Leave a reply