Running a page that reads a text file into an array - then writes the
array to the database.
I get the following error:*
Detail:* [Macromedia][SQLServer JDBC Driver][SQLServer]The incoming
tabular data stream (TDS) remote procedure call (RPC) protocol stream is
incorrect. Too many parameters were provided in this RPC request. The
maximum is 2100.
Looking that up, Ben Nadle says it's from a valuelist being too large:
/id IN ( //<cfqueryparam////value=//"#ValueList( qSelected.id
)#"////cfsqltype=//"cf_sql_integer"////list=//"true"/////>//)
/But, I don't have one of those on the page!/
/Dumping the array in question, it looks OK. There's only 1001 rows.
/Hmmm.....
/Trying a smaller list - 604 records - same error./
/Smaller yet - 200 records - no error.
<cfquery name="insertLIST">
<cfloop from="1" index="i" to="#arrayLen(mailREC)#">
INSERT INTO nl_mailgroups (
ml_email,
ml_firstname,
ml_lastname,
other
) VALUES (
<cfqueryparam value="#mailREC[i][1]#"
cfsqltype="CF_SQL_VARCHAR" />,
<cfqueryparam value="#mailREC[i][2]#"
cfsqltype="CF_SQL_VARCHAR" null="#not len(mailREC[i][2])#" />,
<cfqueryparam value="#mailREC[i][3]#"
cfsqltype="CF_SQL_VARCHAR" null="#not len(mailREC[i][3])#" />,
<cfqueryparam value="#mailREC[i][4]#"
cfsqltype="CF_SQL_VARCHAR" null="#not len(mailREC[i][4])#" /> );
INSERT INTO nl_catREL
( groups_id, ml_id ) VALUES ( <cfqueryparam
value="#req.thisGROUPID#" cfsqltype="CF_SQL_INTEGER" />, scope_identity() );
</cfloop>
</cfquery>/
/There's a limit to how many records I can insert using a query list this??
If so, what's the fix ?/
/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359659
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm