AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 01.09.2009, 15:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
emeadaxsupport: How to fix SQL error: "Too many parameters were provided in this RPC request"
Источник: http://blogs.msdn.com/emeadaxsupport...c-request.aspx
==============

Recently we were confronted with a case where we received the following SQL error:

[Microsoft][SQL Native Client][SQL Server]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.
This error occurs if we are running into a SQL limitation which does not allow more than 2100 parameters in a SQL statement.



Usually it's a Select statement where AX produces OR clauses with too many parameters like WHERE RecId = xxxxxx OR RecId = xxxxxy OR RecId = xxxxyx ...

or IN clauses like
WHERE ID IN (xxxxxx,xxxxxy,xxxxyx, ...)

How to find where this select statements are comming from?
In the SQL statement trace log (Administration -> Inquiries - Tab 'Use') you will find the stack trace that shows you which method caused the SQL error.

How to fix this problem?
We have to add a forceliterals to the select statement in the relevant method.
Adding a forceliterals should avoid running into the SQL limitation of the 2100 parameters, because the statement is handled differently then.

The related statement could either be an X++ select stament or a X++ Query


X++ Stament

Change code from select from TableName
to select forceliterals from TableName

X++ Query

Activate forceliterals on the Query object query.literals(true);


Источник: http://blogs.msdn.com/emeadaxsupport...c-request.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: How to set the number sequence for Global Address Book when virtual companies are used Blog bot DAX Blogs 0 24.08.2009 14:05
emeadaxsupport: How to open an AX form from your own help Blog bot DAX Blogs 0 26.07.2009 15:07
Microsoft Dynamics CRM Team Blog: How it Works: SQL Server Reporting Services and Dynamics CRM Blog bot Dynamics CRM: Blogs 0 19.07.2008 04:42
axStart: How to restore an AX 3.0 SQL 2000 backup in sql 2005 Blog bot DAX Blogs 0 12.02.2008 15:10
Ошибка SQL в модуле "Расчеты с персоналом" Карбофос DAX: Программирование 0 31.07.2002 17:20

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 23:30.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.