Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Unable to find record. No key specified.</strong></p> <p>set select id, name, byteken, timeflag from scales where id = :p1 </p> <p>to</p> <p>select id, name, byteken, timeflag from scales where id = 245</p> <p>an existing id while designing.</p> <hr> <p><strong>to casts</strong> cast (constext as varchar (2048))..... If a column's definition is altered, existing CASTs to that column's type may become invalid</p> <p><strong>Arithmetic exception, numeric overflow, or string truncation</strong></p> <ol> <li><p><strong>String truncation</strong> It happens when the concatenated string doesn't fit the underlying CHAR or VARCHAR datatype size. If the result goes into a table column, perhaps it's a valid error. Or maybe you really need to <strong>increase</strong> the column size. Similar goes for <strong>intermediary values stored in stored procedure or trigger variables</strong>.</p></li> <li><p><strong>Character transliteration failed</strong> This happens when you have data in database stored in one character set, but the transliteration to required character set fails. There are various points where character set transliteration occurs. There is an automatic one: Every piece of data you retrieve from database (via SELECT or otherwise) is transliterated from <strong>character set of database</strong> table's column to <strong>connection character set</strong>. If character sets are too different, there will be two translations: first from column charset to Unicode and then from Unicode to the connection charset. Also, you can request transliteration manually by CASTing the column to another charset, example: CAST(column_name AS varchar(100) character set WIN1251). <strong>The reason</strong> that transliteration can fail is that simply some characters don't exist in certain character sets. For example, WIN1252 doesn't contain any Cyrillic characters, so if you use connection charset WIN1252 and try to SELECT from a column with Cyrillic characters, you may get such error. In modern times, it is best to use Unicode or UTF8 in your applications and UTF8 connection character. And make sure you use at least <strong>Firebird 2.0</strong>, has UTF8 support.</p></li> <li><p><strong>Wrong order of parameters when using DotNetFirebird</strong> The order in which Parameters are added to a FbCommand when using DotNetFirebird might cause the -303 exception with the hint "Arithmetic exception, numeric overflow, or string truncation". The order of the parameters has to fit the order of the params in the stored procedure - otherwise the exception will be thrown. Example (.NET, C#, DotNetFirebird (using FirebirdSql.Data.FirebirdClient;))</p> <p>FbCommand CMD = new FbCommand("TBLTEXT_ADDTEXT", cnn); CMD.Parameters.Add("TEXT1", FbDbType.VarChar, 600).Value = strText1; CMD.Parameters.Add("TEXT2", FbDbType.VarChar, 600).Value = strText2; CMD.CommandType = CommandType.StoredProcedure; CMD.ExecuteNonQuery(); If the order of the parameters inside the procedure "TBLTEXT_ADDTEXT" differ from the order in which you´re adding parameters to the FbCommand-Object, you´ll receive the -303 error.</p></li> </ol> <p>4.</p> <blockquote> <p><em><strong>No'am Newman said</em></strong> But once the error message appears, it always appears, as if the database remembers that there is an error.</p> </blockquote> <p>no remembers; the database is damaged !!! </p> <hr> <p>As long as you are not able to change your database character-set and always experiment with dropping and adding fields to a damaged table, it's hard to solve the problem. 1. For every new test there must be an new database created (TIP: create one and copy them x times). 2. The field set with <strong>plain text not with Cyrillic characters</strong> stored in originally field; you can not see them but they are there. 3. set varchar(8191) and database PAGE_SIZE to 8192. The actual maximum VARCHAR length with UTF8 is 8191</p> <p><strong>CREATE DATABASE statement:</strong></p> <pre><code>CREATE DATABASE localhost:mybase USER SYSDBA PASSWORD masterkey PAGE_SIZE 8192 DEFAULT CHARACTER SET UTF8; SET NAMES ISO8859_1; CREATE TABLE scales ( ID ..., byteken VARCHAR(8191) COLLATE DE_DE, .... </code></pre> <p><strong>Collations</strong></p> <p>There is no default collation. So you should define a collation for every field that is to be used for sorting (ORDER BY) or comparing (UPPER):</p> <p>You can also specify the collation with the ORDER BY clause:</p> <pre><code>ORDER BY LASTNAME COLLATE FR_CA, FIRSTNAME COLLATE FR_CA </code></pre> <p>or with the WHERE clause:</p> <pre><code>WHERE LASTNAME COLLATE FR_CA = :lastnametosearch </code></pre> <p><strong>Unicode</strong></p> <p>Firebird 2.0. and above. Now there is the new UTF8 character set that correctly handles Unicode strings in UTF-8 format. The Unicode collation algorithm has been implemented so now you can use UPPER() and the new LOWER() function <strong>without the need to specify a collation.</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload