SQLite DB Engine StripTypeName
 
StripTypeName method.

Strips the passed string from any insignificant parts - the same way the component does it internally when TypeInfoLevel is set to 2 or 4.

Syntax:

str = object.StripTypeName(type)

Parameters:

type - a string containing a column type designation (for example "TEXT" or "TEXT(20)")

Result is a string containing the basic type name only.

Remarks:

This routine is useful when you need the basic (significant) part of a type definition in order to recognize it. For instance when using PRAGMA table_info(some_table). As the SQLite is type-less the type names like "TEXT(20)" and "TEXT" are fully equivalent. It is still justified to set some size specification if you want to keep the table definitions compatible with some other database engines. Thus in such cases you may need to make sure you work with the important part of the type definition - e.g. "TEXT(20)" will be stripped to "TEXT", "BYTE(20)(10)" will be stripped to "BYTE" etc.

The routine and the internal stripping when it occurs (see for instance TypeInfoLevel when set to 2 or 4) has the following restriction:
The type name must consist of ASCII alphabetic characters (lower case and capital letters) and "_" (underscore) only. The type name is stripped by returning the characters from it up to the first character that is not from this set. The characters are left "as is" no upper casing/lowercasing is performed over them.

Applies to: SQLite COM object

See also: AddNumericType, RemoveNumericType, CountNumericTypes

Supported on:

Windows 95/NT and later
Windows CE 3.0 and later
Pocket PC/Windows Mobile 2003 and later
Windows CE.NET 4 and later

 

newObjects Copyright 2001-2006 newObjects [ ]