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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 03.12.2008, 12:03   #1  
Eldar9x is offline
Eldar9x
MCTS
Аватар для Eldar9x
Oracle
MCBMSS
 
1,064 / 166 (8) ++++++
Регистрация: 29.09.2006
Адрес: Казань
Цитата:
Remarks
The method will fall back to record-by-record insert, if (a) the table is not SQL stored, (b) the insert() method is overloaded, or (c) the tables includes memo- or container-fields. Also, a RecordSortedList must be server-located before insertDatabase() can be called, otherwise an exception is thrown.
правильно ругается + ограничения


Example
Below is an example of how to insert N, or in this case 3, records in one, single database operation.

X++:
{    
RecordSortedList recordSortedList;    CustTable custTable;    
; 
   
recordSortedList = new RecordSortedList(tablenum(CustTable));  
 
 recordSortedList.sortOrder(fieldnum(custTable,AccountNum));

    ttsbegin;

        custTable.AccountNum = '1000';      // prepare record #1 for insertion      
custTable.CreditMax = 10000.0;        
recordSortedList.ins(custTable);

        custTable.AccountNum = '2000';      // prepare record #2 for insertion        
custTable.CreditMax = 500.0;        
recordSortedList.ins(custTable);

        custTable.AccountNum = 'N000';      // prepare record #N for insertion        
custTable.CreditMax = 9999999.9;        
recordSortedList.ins(custTable);

        recordSortedList.insertDatabase();  // all N records are inserted in one database operation
    ttscommit;
}
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Осторожно. RecordSortedList учитывает регистр символов Logger DAX: Программирование 9 23.01.2009 15:39
Как узнать по объекту RecordSortedList, из какой таблицы в нем записи? gl00mie DAX: Программирование 4 20.02.2008 15:39
axStart: RecordSortedList Blog bot DAX Blogs 0 21.12.2007 04:11

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 07:43.