My Jet DB has a table that consists of 5 text fields, CID, UCall, CW, DI, PH. CID and UCall are required, and may not be zero length. The rest are not required, may be zero length and have a default value of NULL.
My query (addMode) is:
INSERT INTO tableMode ( CID, UCall, CW, DI, PH )
VALUES ([In_CID], [In_UCall], [In_CW], [In_DI], [In_PH]);
My connection is:
set ConnTemp=server.createobject("adodb.connection")
ConnTemp.Mode = 3
ConnTemp.Open "provider=microsoft.jet.oledb.4.0;" & "data source=" & DBPath
I execute the query in a classic asp page like this: ConnTemp.addMode aStr
aStr contains: “1A0”, “NF4L”, “Y”, “Y”,”Y”. I’ve tried it with single quotes with the same results
Microsoft JET Database Engine (0x80040E10)
Too few parameters. Expected 5.
/nfdxa/httpdocs/2012/changeact.asp, line 100
You should read this for an explanation of how to use parameters:
http://groups.google.com/group/microsoft.public.inetserver.asp.db/msg/c966c9c8eb98f331