Модераторы: Akella
  

Поиск:

Ответ в темуСоздание новой темы Создание опроса
> Вызов справки SQL Error Code, Из CLP или как нибудь еще 
V
    Опции темы
Greg
Дата 13.9.2009, 17:43 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Бывалый
*


Профиль
Группа: Участник
Сообщений: 158
Регистрация: 16.9.2006
Где: Беларусь, г.Минск

Репутация: нет
Всего: 7



Доброго времени суток.
Недавно я узнал что DB2 CLP позволяет получить описание SQLSTATE или его класса, например:
Цитата

C:\>db2 ? 08003

SQLSTATE 08003: The connection does not exist.

Цитата

C:\>db2 ? 08

 08: Connection Exception

Можно ли подобное получить для SQLERRORCODE ?
Спасибо.

--------------------
Страх перед возможностью ошибки не должен отвращать нас от поисков истины.
PM MAIL   Вверх
Greg
Дата 17.9.2009, 13:11 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Бывалый
*


Профиль
Группа: Участник
Сообщений: 158
Регистрация: 16.9.2006
Где: Беларусь, г.Минск

Репутация: нет
Всего: 7



Ответы:
Цитата

C:\>db2 ? sql418


SQL0418N  A statement contains a use of a parameter marker that is not
      valid.

Explanation:

Untyped parameter markers cannot be used:
*  in a SELECT list
*  as the sole argument of a datetime arithmetic operation
*  in some cases as the sole argument of a scalar function
*  as a sort key in an ORDER BY clause
*  as an argument of an XMLQUERY, XMLEXISTS or XMLTABLE expression.
*  as an argument of UNNEST, CARDINALITY, MAX_CARDINALITY or TRIM_ARRAY,
   or used in array element specification.
*  on the left hand side of an assignment statement when the data type
   of the right hand side cannot be determined

Parameter markers can never be used:
*  in a statement that is not a prepared statement
*  in the fullselect of a CREATE VIEW statement
*  in the triggered action of a CREATE TRIGGER statement

References to the PARAMETER function in the first argument of the XQuery
function db2-fn:sqlquery are also considered to be parameter markers.

The statement cannot be processed.

User response:

Correct the syntax of the statement. If untyped parameter markers are
not allowed, use the CAST specification to give the parameter marker a
data type.

 sqlcode: -418

 sqlstate: 42610

Или
Цитата

C:\>db2 ? sqln418



Это сообщение отредактировал(а) Greg - 17.9.2009, 13:13
--------------------
Страх перед возможностью ошибки не должен отвращать нас от поисков истины.
PM MAIL   Вверх
  
Ответ в темуСоздание новой темы Создание опроса
1 Пользователей читают эту тему (1 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | Другие СУБД | Следующая тема »


 




[ Время генерации скрипта: 0.0880 ]   [ Использовано запросов: 21 ]   [ GZIP включён ]


Реклама на сайте     Информационное спонсорство

 
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности     Powered by Invision Power Board(R) 1.3 © 2003  IPS, Inc.