Sql error code 242

Устранена проблема, возникающая в SQL Server 2014.

SQL Server 2014 Developer SQL Server 2014 Enterprise SQL Server 2014 Standard Еще…Меньше

Проблемы

При установке Microsoft SQL Server 2014 с параметрами по умолчанию свойство Language — Английский (США) us_english, а для даты по умолчанию используется заказ на MDY. Если дата, указанная в операционной системе, отличается от этого, при настройке управляемого резервного копирования на Windows Azure появляются следующие сообщения об ошибках после завершения архивации. Ошибка:

SqlError, код = 242, стадия = undefine, сообщение = преобразование типа данных varchar в тип данных datetime привело к появлению значения за пределами диапазона.  Инструкция была прервана.

Стека

на странице System. Data. SqlClient. SqlConnection. OnError (SqlException Exception, Boolean breakConnection, Action «1 wrapCloseInAction) на System. Data. SqlClient. TdsParser. ThrowExceptionAndWarning (TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) на странице System. Data. SqlClient. TdsParser. TryRun (RunBehavior RunBehavior, cmdHandler) на& компьютере. SqlClient. SqlCommand. FinishExecuteReader (SqlDataReader DS, RunBehavior runBehavior, String resetOptionsString) на System. Data. SqlClient. SqlCommand. RunExecuteReaderTds (CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, timeout, Task& Task, Boolean asyncWrite, SqlDataReader DS) на System. Data. SqlClient. SqlCommand. RunExecuteReader (CommandBehavior. cmdBehavior). строковый метод, TaskCompletionSource» 1 завершение «, предельное время в Int32, задача& задача, логическая asyncWrite) на System. Data. SqlClient. SqlCommand. InternalExecuteNonQuery (TaskCompletionSource» 1 «,» имя_метода «,» «, время ожидания Int32, Boolean SendToPipe) на System. Data. SqlClient. SqlCommand. ExecuteNonQuery () в Microsoft. SqlServer. AsyncWrite. SmartAdmin SmartBackupFilesTableRow строка, SqlConnection conn, Boolean&-дубликаты) в Microsoft. SqlServer. SmartAdmin. SmartBackupAgent. FileService. GetLastLSNAndInsertToHelperTable (System. String, System. Nullable-1<System. GUID>, System. Nullable, System. null» 1<System.> ByRef, System. Nullable «1<System. Decimal> ByRef, System. Nullable «1<System. GUID> ByRef, System. Nullable» 1<System. Decimal> ByRef) в Microsoft. SqlServer. SmartAdmin. SmartBackupAgent. SmartBackup. DoJobOutcomeVerification (Microsoft. SqlServer. SmartAdmin. SmartBackupAgent. AutoBackupDBData) в Microsoft. SqlServer. SmartAdmin. SmartBackupAgent. SmartBackup. DoWork () на странице System. Threading., а. RunInternal (System. Threading.,…….. ContextCallback, System. Object, Boolean) на странице System. Threading. контексте. Run (System. Threading.; System. Threading. ContextCallback; System. Object, Boolean) в System. Threading., System. Threading. ContextCallback, System. Object) на System. Threading.

Решение

Эта проблема впервые устранена в следующем накопительном обновлении SQL Server.

Накопительное обновление 5 для SQL Server 2014 /en-us/help/3011055

Все новые накопительные обновления для SQL Server содержат все исправления и все исправления для системы безопасности, которые были включены в предыдущий накопительный пакет обновления. Ознакомьтесь с самыми последними накопительными обновлениями для SQL Server.

  • Последнее накопительное обновление для SQL Server 2014

Статус

Корпорация Майкрософт подтверждает наличие этой проблемы в своих продуктах, которые перечислены в разделе «Применяется к».

Нужна дополнительная помощь?

Home > SQL Server Error Messages > Msg 242 — The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

SQL Server Error Messages — Msg 242 — The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

SQL Server Error Messages — Msg 242

Error Message

Server: Msg 242, Level 16, State 3, Line 1
The conversion of a char data type to a datetime data
type resulted in an out-of-range datetime value.

Causes:

This error occurs when trying to convert a string date value into a DATETIME data type but the date value contains an invalid date.  The individual parts of the date value (day, month and year) are all numeric but together they don’t form a valid date.

To illustrate, the following SELECT statements will generate the error:

SELECT CAST('02/29/2006' AS DATETIME) -- 2006 Not a Leap Year
SELECT CAST('06/31/2006' AS DATETIME) -- June only has 30 Days
SELECT CAST('13/31/2006' AS DATETIME) -- There are only 12 Months
SELECT CAST('01/01/1600' AS DATETIME) -- Year is Before 1753

Another way the error may be encountered is when the format of the date string does not conform to the format expected by SQL Server as set in the SET DATEFORMAT command.  To illustrate, if the date format expected by SQL Server is in the MM-DD-YYYY format, the following statement will generate the error:

SELECT CAST('31-01-2006' AS DATETIME)

Solution / Work Around:

To avoid this error from happening, you can check first to determine if a certain date in a string format is valid using the ISDATE function.  The ISDATE function determines if a certain expression is a valid date.  So if you have a table where one of the columns contains date values but the column is defined as VARCHAR data type, you can do the following query to identify the invalid dates:

SELECT * FROM [dbo].[CustomerTransactions]
WHERE ISDATE([TranDate]) = 0

Once the invalid dates have been identified, you can have them fixed manually then you can use the CAST function to convert the date values into DATETIME data type:

SELECT CAST([TranDate] AS DATETIME) AS [TranDate]
FROM [dbo].[CustomerTransactions]

Another way to do this without having to update the table and simply return a NULL value for the invalid dates is to use a CASE condition:

SELECT CASE ISDATE([TranDate]) WHEN 0
            THEN CAST([TranDate] AS DATETIME)
            ELSE CAST(NULL AS DATETIME) END AS [TranDate]
FROM [dbo].[CustomerTransactions]
Related Articles :
  • Frequently Asked Questions — SQL Server Error Messages
  • Frequently Asked Questions — INSERT Statement
  • Frequently Asked Questions — SELECT Statement

Troubleshooting

Problem

You are trying to run an ALTER TABLE command on a table but you see these errors:

-242 SQL error: Could not open database table
-106 ISAM error: non-exclusive access

There are no locks on the table. This is happening although you possibly have one or both of these set:

SET LOCK MODE TO WAIT
LOCK TABLE tab1 IN EXCLUSIVE MODE

Cause

You do not have exclusive access to the table. This means there is a lock on the table or there is a select running on the table. An ALTER TABLE operation has a condition that only the session running the ALTER TABLE is accessing the table or it will fail immediately. Having LOCK MODE set to WAIT or having an exclusive lock on the table will not change the behavior.

Diagnosing The Problem

1. Determine the partnum or tblsnum of the table you are trying to alter. Run this select in the database where your table resides:

select hex(partnum) from systables where tabname = «your_table_name»

For this example the value returned is 0x00100045

2. Look for a lock on the table. You will search for table’s partnum in the onstat -k output. The onstat -k output does not display the 0x or leading 0. This means 0x00100045 in the onstat -k output would look like 100045 Run this command:

onstat -k | grep 100045

If nothing is returned, then there are no locks on the table.

3. Check to see if the table is open ( most likely has one or more selects running on it ). Run this command:

onstat -g opn | grep 0x00100045

If nothing is returned, then the table is not being accessed and you can run your ALTER TABLE command. If you do find that the table is open, then proceed to Resolving the problem.

Resolving The Problem

  • If you are running ALTER FRAGMENT ON TABLE then starting in v11.50 and above you can set FORCE_DDL_EXEC to ON in your environment then rerun the ALTER FRAGMENT. Here are a couple links that provide detailed description of FORCE_DDL_EXEC:FORCE_DDL_EXEC Environment Option
    Forcing out transactions when altering table fragments
  • Wait for users to leave the table then rerun your ALTER TABLE. You can run LOCK TABLE tab1 IN EXCLUSIVE MODE so new users cannot lock the table. Users can access the exclusively locked table if their isolation level is set to dirty read. A dirty read select counts as a user accessing the table and will cause the ALTER TABLE to fail.
  • Run onstat -g sql 0. This will give you a list of all the sql running on the database server. You can find all sqls running on the table. The output will also give you the session id. You can then run onmode -z session_id on each session accessing the table. onmode -z will destroy an active session so use it with caution. Run the ALTER TABLE.
  • Run this select statement in sysmaster database to get a list of all sessions with an sql referencing your table:

    select scs_sessionid from syssqlcurses where scs_sqlstatement like «%your_table%»

    The first row returned is the session id for the session running this select. You can then run onmode -z on the sessions accessing the table. onmode -z will destroy an active session so use it with caution.

  • Set IFX_DIRTY_WAIT. For details click this link:
    http://www.ibm.com/support/docview.wss?rs=630&uid=swg21174239
  • Restart the database server and run the ALTER TABLE immediately.

[{«Product»:{«code»:»SSGU8G»,»label»:»Informix Servers»},»Business Unit»:{«code»:»BU053″,»label»:»Cloud & Data Platform»},»Component»:»—«,»Platform»:[{«code»:»PF002″,»label»:»AIX»},{«code»:»PF010″,»label»:»HP-UX»},{«code»:»PF016″,»label»:»Linux»},{«code»:»PF022″,»label»:»OS X»},{«code»:»PF027″,»label»:»Solaris»},{«code»:»PF033″,»label»:»Windows»}],»Version»:»10.0;11.1;11.5;9.4;11.7;12.1″,»Edition»:»»,»Line of Business»:{«code»:»»,»label»:»»}}]

    msm.ru

    Нравится ресурс?

    Помоги проекту!

    !
    информация о разделе

    user posted image Данный раздел предназначается исключительно для обсуждения вопросов использования языка запросов SQL. Обсуждение общих вопросов, связанных с тематикой баз данных — обсуждаем в разделе «Базы данных: общие вопросы». Убедительная просьба — соблюдать «Правила форума» и не пренебрегать «Правильным оформлением своих тем». Прежде, чем создавать тему, имеет смысл заглянуть в раздел «Базы данных: FAQ», возможно там уже есть ответ.

    >
    Не получается добавить/обновить поле дата
    , причём вчера всё работало

    • Подписаться на тему
    • Сообщить другу
    • Скачать/распечатать тему

      


    Сообщ.
    #1

    ,
    18.07.07, 07:07

      Пытаюсь сделать UPDATE поля с типом datetime и выдаёт:

      SQL State: 22007, SQL Error Code: 242
      The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

      При чём ещё вчера в это поле нормально добавлялись данные, обновлялись нормально.
      Атрибуты у поля : NOT NULL и больше никаких.

      Сообщение отредактировано: Дима — 18.07.07, 07:08

      Master

      MIF



      Сообщ.
      #2

      ,
      18.07.07, 07:30

        Дима, посмотри, встречается ли полe в constraints, relationships и триггерах.


        Дима



        Сообщ.
        #3

        ,
        18.07.07, 07:33

          MIF, а где это посмотреть? Как? :wacko:

          Добавлено 18.07.07, 08:24
          MIF, всё намного проще — дата в БД должна быть в американском формате : месяц.день.год. Писец тепреь столько менять >:(

          Сообщение отредактировано: Дима — 18.07.07, 08:24


          Vadikov



          Сообщ.
          #4

          ,
          18.07.07, 08:43

            Junior

            *

            Рейтинг (т): 5

            Дима, ты полностью запрос дай в студию.


            Дима



            Сообщ.
            #5

            ,
            18.07.07, 08:49

              Vadikov, чё ж там давать? Просто добавление в таблицу, в поле datetime. Для примера вот таблица:

              ExpandedWrap disabled

                CREATE TABLE [dbo].[test] (

                    [id] [int] IDENTITY (1, 1) NOT NULL ,

                    [Date] [datetime] NOT NULL

                ) ON [PRIMARY]

                GO

              А вот запрос к ней:

              ExpandedWrap disabled

                INSERT INTO test(Date) VALUES(‘18.07.2007 11:46:00’)

              А вот ответ >:( :

              The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

              Если вставку делаю даты у которой день <=12, тогда всё Ок. Значиться в БД американский формат даты.

              Есть вариант переключить его на нормальный?


              Vadikov



              Сообщ.
              #6

              ,
              18.07.07, 08:59

                Junior

                *

                Рейтинг (т): 5

                А попробуй так:

                ExpandedWrap disabled

                  INSERT INTO test(Date) VALUES(‘2007-07-18 11:46:00’)

                Формат datetime YYYY-MM-DD HH:MM:SS

                Сообщение отредактировано: Vadikov — 18.07.07, 09:00


                Дима



                Сообщ.
                #7

                ,
                18.07.07, 09:06

                  Vadikov, добавляется. И после в Enterprise Manager тображается нормально (18.07.2007 11:46:00). Тогда и программа моя достаёт её нормально. Переделывать меньше (только запись в БД корявым американским форматом так как чтение нормально работает), но всё же переделывать :(

                  Добавлено 18.07.07, 09:10
                  Понял я «где собака порылась» ! Это ж из-за региональных настроек у меня на клиентской машине автоматически переворачивается дата в нормальный вид.

                  Сообщение отредактировано: Дима — 18.07.07, 09:10


                  Vadikov



                  Сообщ.
                  #8

                  ,
                  18.07.07, 09:18

                    Junior

                    *

                    Рейтинг (т): 5

                    Дима, Если не хочеться переколбашивать программу надо только переколбасить запросы когда апдейтишь и когда достаешь.

                    Давай доставать в твой формат:

                    ExpandedWrap disabled

                      SELECT DATE_FORMAT(Date, «%e.%m.%Y %H:%i:%s») FROM base WHERE id = ля-ля

                    Здесь уже будет из кривого формата браться DD.MM.YY HH:MM:SS

                    и на UPDATE придется криво записывать:

                    Сообщение отредактировано: Vadikov — 18.07.07, 09:19


                    Дима



                    Сообщ.
                    #9

                    ,
                    18.07.07, 09:23

                      Vadikov, этот DATE_FORMAT() это MS SQL или с другими СУБД тоже пойдёт?


                      Vadikov



                      Сообщ.
                      #10

                      ,
                      18.07.07, 09:26

                        Junior

                        *

                        Рейтинг (т): 5

                        FrontBase
                        Microsoft SQL Server
                        MySQL
                        ODBC
                        PostgreSQL
                        Sybase-CT

                        Вроде как везде одинаково пользуется эта функция


                        Дима



                        Сообщ.
                        #11

                        ,
                        18.07.07, 09:28

                          Vadikov, нужных мне Oracle и Informix как раз в списке нет :(


                          Vadikov



                          Сообщ.
                          #12

                          ,
                          18.07.07, 09:35

                            Junior

                            *

                            Рейтинг (т): 5

                            Дима, сейчас выясню…

                            Добавлено 18.07.07, 09:36
                            Для Oracle так: http://www.techonthenet.com/oracle/functions/to_date.php


                            Дима



                            Сообщ.
                            #13

                            ,
                            18.07.07, 09:52

                              Vadikov, и вообщем это всё подойдёт если точно знать какие региональные настройки стоят на сервере. А если писать универсально? Как записать дату в поле типа datetime независимо от региональных настроек сервера? Или если я буду писать в формате ‘2007-07-18 11:46:00’ то это прокатит всегда?


                              Vadikov



                              Сообщ.
                              #14

                              ,
                              18.07.07, 09:57

                                Junior

                                *

                                Рейтинг (т): 5

                                Дима, это прокатит всегда так как этот кривой формат по умолчанию в SQL!

                                Master

                                MIF



                                Сообщ.
                                #15

                                ,
                                18.07.07, 09:57

                                  Универсальный подход — использование АДО параметров. При таком подходе код не зависит от региональных настроек сервера и клиента.

                                  0 пользователей читают эту тему (0 гостей и 0 скрытых пользователей)

                                  0 пользователей:

                                  • Предыдущая тема
                                  • Базы данных: SQL
                                  • Следующая тема

                                  Рейтинг@Mail.ru

                                  [ Script execution time: 0,0378 ]   [ 15 queries used ]   [ Generated: 10.02.23, 02:58 GMT ]  

                                  The table below lists the SQL numeric error codes and their error messages. These codes are returned as the SQLCODE variable value.

                                  Note:

                                  While this document lists error codes as negative values, JDBC and ODBC clients always receive positive values. For example, if an ODBC or JDBC application returns error code 30, look up error code -30 in this table.

                                  SQLCODE 0 and 100

                                  There are two SQLCODE values that do not represent an SQL error:

                                  SQL Error Codes 0 and 100

                                  Error Code Description
                                  0 Successful Completion
                                  100 No (more) data
                                  • SQLCODE=0 indicates successful completion of an SQL operation. For a SELECT statement, this usually means the successful retrieval of data from a table. However, if the SELECT performs an aggregate operation, (for example: SELECT SUM(myfield)) the aggregate operation is successful and an SQLCODE=0 is issued even when there is no data in myfield; in this case SUM returns NULL and %ROWCOUNT=1.

                                  • SQLCODE=100 indicates that the SQL operation was successful, but found no data to act upon. This can occur for a number of reasons. For a SELECT these include: the specified table contains no data; the table contains no data that satisfies the query criteria; or row retrieval has reached the final row of the table. For an UPDATE or DELETE these include: the specified table contains no data; or the table contains no row of data that satisfies the WHERE clause criteria. In these cases %ROWCOUNT=0.

                                  SQLCODE -400

                                  The SQLCODE -400 error “Fatal error occurred” is a general error. It is generated when a more specific SQLCODE error code is not available.

                                  Retrieving SQL Message Texts

                                  To determine the meaning of an SQLCODE numeric code, use the following ObjectScript statement:

                                     WRITE "SQLCODE=",$SYSTEM.SQL.SQLCODE(-nnn)

                                  This SQLCODE()Opens in a new tab method can also be called as a stored procedure from ODBC or JDBC: %SYSTEM.SQL_SQLCODE(-nnn).

                                  When possible (usually at SQL compile time), error messages include the name of the field, table, view, or other element that caused the error. Placeholders for these names are shown using the <name> syntax convention.

                                  The %msg variable may contain an additional message error text for certain errors. For further details, refer to System Variables in the “Using Embedded SQL” chapter of Using Caché SQL.

                                  The message texts returned are shown below in their English versions. The actual message text returned depends upon your locale setting.

                                  For information on generating ObjectScript general errors from SQLCODE errors, refer to the %SYSTEM.ErrorOpens in a new tab class in the InterSystems Class Reference.

                                  Table of SQL Error Codes and Messages

                                  For ease of use, the SQL Error Codes Table has been divided into the following sub-tables:

                                  • Error Codes 0 and 100

                                  • Error Codes -1 to -99

                                  • Error Codes -101 to -399

                                  • Error Codes -400 to -500

                                  • WinSock Error Codes -10050 to -11002

                                  SQL Error Codes -1 to -99

                                  Error Code Description
                                  -1 Invalid SQL statement
                                  -2 Exponent digits missing after ‘E’
                                  -3 Closing quote («) missing
                                  -4 A term expected, beginning with one of the following: identifier, constant, aggregate, %ALPHAUP, %EXACT, %MVR, %SQLSTRING, %SQLUPPER, %STRING, %UPPER, $$, :, +, -, (, NOT, EXISTS, or FOR
                                  -5 Column number specified in ORDER does not match SELECT list
                                  -6 ORDER BY column after UNION not found as SELECT column
                                  -7 Exponent out of range
                                  -8 Invalid DATEPART code for DATEPART(), DATENAME(), DATEADD(), or DATEDIFF()
                                  -9 Incompatible SELECT lists used in UNION
                                  -10 The SELECT list of the subquery must have exactly one item
                                  -11 A scalar expression expected, not a condition
                                  -12 A term expected, beginning with one of the following: identifier, constant, aggregate, $$, :, (, +, -, %ALPHAUP, %EXACT, %MVR, %SQLSTRING, %SQLUPPER, %STRING, or %UPPER
                                  -13 An expression other than a subquery expected here
                                  -14 A comparison operator is required here
                                  -15 A condition expected after NOT
                                  -16 Quantifier SOME expected after the FOR in the for-expression
                                  -17 A for-condition expected after the ( in the for-expression
                                  -18 IS (or IS NOT) NULL predicate can be applied only to a field
                                  -19 An aggregate function cannot be used in a WHERE or GROUP BY clause
                                  -20 Name conflict in the FROM list over label
                                  -21 Pointer->Field reference may not be modified by an INSERT or UPDATE statement
                                  -22 ORDER must specify column names, not numbers, when after ‘SELECT *’
                                  -23 Label is not listed among the applicable tables
                                  -24 Ambiguous sort column
                                  -25 Input encountered after end of query
                                  -26 Missing FROM clause
                                  -27 Field is ambiguous among the applicable tables
                                  -28 Host variable name must begin with either % or a letter
                                  -29 Field not found in the applicable tables
                                  -30 Table or view not found
                                  -31 Field not (found/unique) in table(s)
                                  -32 Outer-join symbol ( =* or *= ) must be between two fields
                                  -33 No field(s) found for table
                                  -34 Optimizer failed to find a usable join order
                                  -35 INSERT/UPDATE/DELETE not allowed for non-updateable view
                                  -36 WITH CHECK OPTION (CHECKOPTION class parameter) not allowed for non-updateable views
                                  -37 SQL Scalar/Aggregate/Unary function not supported for Stream fields
                                  -38 No master map for table
                                  -39 No RowID field for table
                                  -40 ODBC escape extension not supported
                                  -41 An extrinsic function call must have the form ‘$$tag^routine(…)’
                                  -42 Closing quotes («») missing following pattern match
                                  -43 Table is ambiguous within #IMPORT schema name list
                                  -44 Duplicate method or query characteristic
                                  -45 Duplicate method in ObjectScript query body
                                  -46 Required method missing in ObjectScript query body
                                  -47 Invalid method or query characteristic
                                  -48 Invalid trigger REFERENCING clause for the trigger’s event
                                  -49 Trigger REFERENCING clause cannot be specified when trigger language not SQL
                                  -50 Trigger specifies UPDATE OF <fieldlist> clause when trigger language not SQL
                                  -51 SQL statement expected
                                  -52 Cursor (Already/Was Not) DECLAREd
                                  -53 Constant or variable expected as new value
                                  -54 Array designator (last subscript omitted) expected after VALUES
                                  -55 Invalid GRANT <role> TO or REVOKE <role> FROM
                                  -56 GRANT/REVOKE Action not applicable to an object of this type
                                  -57 Trigger specifies WHEN clause when trigger language not SQL
                                  -58 Duplicate field found in trigger UPDATE OF <fieldlist> clause
                                  -59 Cannot have more than one field
                                  -60 An action (%ALTER, SELECT, UPDATE, etc.) expected
                                  -61 Cursor not updateable
                                  -62 Additional new values expected for INSERT/UPDATE
                                  -63 Data exception — invalid escape character
                                  -64 Incompatible SELECT list is used in INSERT
                                  -65 Positive integer constant or variable expected
                                  -66 Redundant fields found in SELECT list
                                  -67 Implicit join (arrow syntax) not supported in ON clause
                                  -68 Legacy outer join (=*, *=) not supported in ON clause
                                  -69 SET <field> = <value expression> not allowed with WHERE CURRENT OF <cursor>
                                  -70 Multi-Line field only valid for LIKE, Contains ([), or NULL Comparison.
                                  -71 Multi-Line field must be the left operand of the Comparison.
                                  -72 Multi-Line field not valid in ORDER BY clause
                                  -73 Aggregates not supported in ORDER BY clause
                                  -74 Duplicate <select-list> alias names found
                                  -75 <trim_spec> and/or <trim_char> required before FROM in TRIM function.
                                  -76 Cardinality mismatch between the SELECT-list and INTO-list.
                                  -77 Qualified column reference not allowed in this JOIN context.
                                  -78 Invalid transaction state.
                                  -79 Referencing key and referenced key must be the same size
                                  -80 Integer expected
                                  -81 Column Constraint expected
                                  -82 Multiple table %DESCRIPTION definitions found
                                  -83 Multiple table %FILE definitions found
                                  -84 Multiple table %NUMROWS definitions found
                                  -85 Multiple table %ROUTINE definitions found
                                  -86 Invalid field definition, no datatype defined
                                  -87 Invalid table name
                                  -88 Invalid field name
                                  -89 Invalid index name
                                  -90 Invalid view name
                                  -91 Transaction mode cannot be specified more than once
                                  -92 Level of isolation cannot be READ UNCOMMITTED or READ VERIFIED if READ WRITE specified
                                  -93 number of conditions for the DIAGNOSTICS SIZE must be exact numeric
                                  -94 Unsupported usage of OUTER JOIN
                                  -95 Operation disallowed by operation table
                                  -96 Specified level of isolation is not supported
                                  -97 Duplicate select-list names found.
                                  -98 License violation
                                  -99 Privilege violation

                                  SQL Error Codes -101 to -399

                                  Error Code Description
                                  -101 Attempt to open a cursor that is already open
                                  -102 Operation (FETCH/CLOSE/UPDATE/DELETE/…) attempted on an unopened cursor
                                  -103 Positioned UPDATE or DELETE attempted, but the cursor is not positioned on any row
                                  -104 Field validation failed in INSERT, or value failed to convert in DisplayToLogical or OdbcToLogical
                                  -105 Field validation failed in UPDATE
                                  -106 Row to DELETE not found
                                  -107 Cannot UPDATE RowID or RowID based on fields
                                  -108 Required field missing; INSERT or UPDATE not allowed
                                  -109 Cannot find the row designated for UPDATE
                                  -110 Locking conflict in filing
                                  -111 Cannot INSERT into a ‘Default Only’ RowID or RowID based on field
                                  -112 Access violation
                                  -113 %THRESHOLD violation
                                  -114 One or more matching rows is locked by another user
                                  -115 Cannot INSERT/UPDATE/DELETE on a read only table
                                  -116 Cardinality mismatch on INSERT/UPDATE between values list and number of table columns.
                                  -117 Aggregates not supported in views
                                  -118 Unknown or non-unique User or Role
                                  -119 UNIQUE or PRIMARY KEY constraint failed uniqueness check upon INSERT
                                  -120 UNIQUE or PRIMARY KEY constraint failed uniqueness check upon UPDATE
                                  -121 FOREIGN KEY constraint failed referential check upon INSERT of row in referencing table
                                  -122 FOREIGN KEY constraint failed referential check upon UPDATE of row in referencing table
                                  -123 FOREIGN KEY constraint failed referential check upon UPDATE of row in referenced table
                                  -124 FOREIGN KEY constraint failed referential check upon DELETE of row in referenced table
                                  -125 UNIQUE or PRIMARY KEY Constraint failed uniqueness check upon creation of the constraint
                                  -126 REVOKE with RESTRICT failed.
                                  -127 FOREIGN KEY Constraint failed referential check upon creation of the constraint
                                  -128 Argument to scalar function %OBJECT() must be a stream field
                                  -129 Illegal value for SET OPTION locale property
                                  -130 Before Insert trigger failed
                                  -131 After Insert trigger failed
                                  -132 Before Update trigger failed
                                  -133 After Update trigger failed
                                  -134 Before Delete trigger failed
                                  -135 After Delete trigger failed
                                  -136 View’s WITH CHECK OPTION validation failed in INSERT
                                  -137 View’s WITH CHECK OPTION validation failed in UPDATE
                                  -138 Cannot INSERT/UPDATE a value for a read only field
                                  -139 Concurrency failure on update: row versions not the same
                                  -140 Invalid length parameter passed to the SUBSTRING function
                                  -141 Invalid input value passed to the CONVERT function
                                  -142 Cardinality mismatch between the view-column-list and view query’s SELECT clause
                                  -143 ORDER BY not valid in a view’s query
                                  -144 A subquery is not allowed in an insert statement’s set/values clause
                                  -145 SQLPREVENTFULLSCAN class parameter is 1 for this table. Query that performs full scan of data map is not allowed
                                  -146 Unable to convert date input to a valid logical date value
                                  -147 Unable to convert time input to a valid logical time value
                                  -148 CREATE VIEW, ALTER VIEW, or a view’s query may not contain host variable references
                                  -149 SQL Function encountered an error
                                  -150 Optimistic concurrency locking for a class definition failed
                                  -151 Index is not found within tables used by this statement
                                  -152 Index is ambiguous within tables used by this statement
                                  -161 References to an SQL connection must constitute a whole subquery
                                  -162 SQL Connection is not defined
                                  -201 Table or view name not unique
                                  -220 Gateway query error
                                  -221 Gateway query GetConnection() failed
                                  -222 Gateway query AllocStatement() failed
                                  -223 Gateway query Prepare() failed
                                  -225 Gateway query BindParameters() failed
                                  -226 Gateway query Execute() failed
                                  -227 Gateway query Fetch() failed
                                  -228 Gateway query GetData() failed
                                  -241 Parallel query queue error
                                  -242 Parallel query run-time error
                                  -300 DDL not allowed on this table definition
                                  -301 No Savepoint name
                                  -302 Savepoint names starting with «SYS» are reserved
                                  -303 No implicit conversion of Stream value to non-Stream field in UPDATE assignment is supported
                                  -304 Attempt to add a NOT NULL field with no default value to a table which contains data
                                  -305 Attempt to make field required when the table has one or more rows where the column value is NULL
                                  -306 Column with this name already exists
                                  -307 Primary key already defined for this table
                                  -308 Identity column already defined for this table
                                  -309 The left operand of %CONTAINS is not a property that supports the %Text interface
                                  -310 Foreign key references non-existent table
                                  -311 Foreign key with same name already defined for this table
                                  -312 Invalid schema name. Must use delimited identifiers to reference this schema name
                                  -313 Condition expression not supported for Stream fields
                                  -314 Foreign key references non-unique key/column collection
                                  -315 Constraint or Key not found
                                  -316 Foreign key references non-existent key/column collection
                                  -317 Cannot DROP Constraint — One or more Foreign Key constraints reference this Unique constraint
                                  -319 Referenced table has no primary key defined
                                  -320 Cannot DROP table — One or more Foreign Key constraints reference this table
                                  -321 Cannot DROP view — One or more views reference this view
                                  -322 Cannot DROP column — column is defined on one or more indexes or constraints
                                  -324 Index with this name already defined for this table
                                  -325 Index cannot be dropped because it is the IDKEY index and the table has data
                                  -333 No such index defined
                                  -334 Index name is ambiguous. Index found in multiple tables.
                                  -340 No such database (namespace) defined
                                  -341 Database file already exists
                                  -342 Cannot delete system namespace
                                  -343 Invalid database name
                                  -344 Cannot drop database that you are currently using or connected to
                                  -350 An unexpected error occurred executing SqlComputeCode
                                  -356 SQL Function (function stored procedure) is not defined to return a value
                                  -357 SQL Function (function stored procedure) is not defined as a function procedure
                                  -358 SQL Function (function stored procedure) name not unique
                                  -359 SQL Function (function stored procedure) not found
                                  -360 Class not found
                                  -361 Method or Query name not unique
                                  -362 Method or Query not found
                                  -363 Trigger not found
                                  -364 Trigger with same EVENT, TIME, and ORDER already defined
                                  -365 Trigger name not unique
                                  -366 Schema name mismatch between trigger name and table name
                                  -370 SQL CALL, more arguments specified than defined in the stored procedure
                                  -371 :HVar = CALL … Specified for a procedure which does not return a value
                                  -372 Support for extrinsic function calls are disabled
                                  -373 An extrinsic function call may not call a % routine
                                  -374 Cannot alter the datatype of a field to/from a stream type when the table contains data
                                  -375 Cannot ROLLBACK to unestablished savepoint
                                  -376 Unsupported CAST target specified
                                  -377 Field appears more than once in assignment list of insert or update statement
                                  -378 Datatype mismatch, explicit CAST is required
                                  -380 Invalid or Missing argument to scalar function
                                  -381 Too many arguments to scalar function

                                  SQL Error Codes -400 to -500

                                  Error Code Description
                                  -400 Fatal error occurred
                                  -401 Fatal Connection error
                                  -402 Invalid Username/Password
                                  -405 Unable to read from communication device
                                  -406 Unable to Write to Server
                                  -407 Unable to Write to Server Master
                                  -408 Unable to start server
                                  -409 Invalid server function
                                  -410 Invalid Directory
                                  -411 No stream object defined for field
                                  -412 General stream error
                                  -413 Incompatible client/server protocol
                                  -415 Fatal error occurred within the SQL filer
                                  -416 CacheInfo Error
                                  -417 Security Error
                                  -422 SELECT request processed via ODBC, JDBC, or Dynamic SQL cannot contain an INTO clause
                                  -425 Error processing stored procedure request
                                  -426 Error preparing stored procedure
                                  -427 Invalid stored procedure name
                                  -428 Stored procedure not found
                                  -429 Invalid number of input/output parameters for stored procedure
                                  -430 Cannot initialize procedure context
                                  -431 Stored procedure parameter type mismatch
                                  -432 Function returned multiple rows when only a single value is expected
                                  -450 Request timed out due to user timeout
                                  -451 Unable to receive server message
                                  -452 Message sequencing error
                                  -453 Error in user initialization code
                                  -454 Error sending external interrupt request
                                  -459 Kerberos authentication failure
                                  -460 General error
                                  -461 Communication link failure
                                  -462 Memory allocation failure
                                  -463 Invalid column number
                                  -464 Function sequence error
                                  -465 Invalid string or buffer length
                                  -466 Invalid parameter number
                                  -467 Column type out of range
                                  -468 Fetch type out of range
                                  -469 Driver not capable
                                  -470 Option value changed
                                  -471 Duplicate cursor name
                                  -472 A collection-valued property was expected
                                  -478 Query recompiled: Result Set mismatch
                                  -500 Fetch row count limit reached

                                  WinSock Error Codes -10050 to -11002

                                  Error Code Description
                                  -10050 WinSock: Network is down
                                  -10051 WinSock: Network is unreachable
                                  -10052 WinSock: Net dropped connection or reset
                                  -10054 WinSock: Connection reset by peer (due to timeout or reboot)
                                  -10055 WinSock: No buffer space available
                                  -10056 WinSock: Socket is already connected
                                  -10057 WinSock: Socket is not connected
                                  -10058 WinSock: Cannot send after socket shutdown
                                  -10060 WinSock: Connection timed out
                                  -10061 WinSock: Connection refused
                                  -10064 WinSock: Host is down
                                  -10065 WinSock: No route to host
                                  -10070 WinSock: Stale NFS file handle
                                  -10091 WinSock: Network subsystem is unavailable
                                  -10092 WinSock: WINSOCK DLL version out of range
                                  -10093 WinSock: Successful WSASTARTUP not yet performed
                                  -11001 WinSock: Host not found
                                  -11002 WinSock: Nonauthoritative host not found

                                  Понравилась статья? Поделить с друзьями:
                                • Sql error 1054 sqlstate 42s22
                                • Sql error code 208
                                • Sql error 23505 error duplicate key value violates unique constraint
                                • Sql error code 204 table unknown
                                • Sql error code 204 firebird