Issue Details (XML | Word | Printable)

Key: ODBC-132
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Potapchenko
Reporter: faridz
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ODBC Driver

Incorrect SQL_DESC_TYPE_NAME for 'blob sub_type text' data type

Created: 02/Oct/11 07:45 PM   Updated: 18/Aug/12 07:31 AM
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 2.0.1

File Attachments: None
Image Attachments:

1. fb_blob_data_type.jpg
(19 kB)

2. screen3.jpg
(35 kB)

3. screenshot2.jpg
(23 kB)
Environment: Windows 7 64-bit


 Description  « Hide
Firebird/Interbase(r) driver 2.00.00.151 64-bit

Driver returns 'LONG VARCHAR' for SQL_DESC_TYPE_NAME for 'blob sub_type text' column. Should return 'blob sub_type text' (same as from ::SQLGetTypeInfo for the data type)

Example,

create table test_data_type (
  col_sql_wchar char(20) character set unicode_fss,
  col_sql_wvarchar varchar(20) character set unicode_fss,
  col_sql_wlongvarchar blob sub_type text character set unicode_fss,
  col_sql_longvarchar blob sub_type text,
  col_sql_longvarbinary blob
)
        // type_name
        rc = SQLColAttribute(hstmt,
                             nCol,
                             SQL_DESC_TYPE_NAME,
                             pRow->type_name,
                             sizeof(pRow->type_name),
                             &nLen,
                             NULL);


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
faridz made changes - 02/Oct/11 07:47 PM
Field Original Value New Value
Attachment fb_blob_data_type.jpg [ 12015 ]
faridz added a comment - 14/Oct/11 08:11 PM - edited
[removed comment]

faridz added a comment - 14/Oct/11 08:15 PM - edited
[removed comment]

faridz made changes - 14/Oct/11 08:15 PM
Attachment screenshot2.jpg [ 12019 ]
faridz added a comment - 14/Oct/11 08:35 PM
Update example with additional data types

faridz made changes - 14/Oct/11 08:35 PM
Description Firebird/Interbase(r) driver 2.00.00.151 64-bit

Driver returns 'LONG VARCHAR' for SQL_DESC_TYPE_NAME for 'blob sub_type text' column. Should return 'blob sub_type text'

Example,

create table test_char (
 col1 int not null,
  OBJECT_SCRIPT blob sub_type text
);

        // type_name
        rc = SQLColAttribute(hstmt,
                             nCol,
                             SQL_DESC_TYPE_NAME,
                             pRow->type_name,
                             sizeof(pRow->type_name),
                             &nLen,
                             NULL);
Firebird/Interbase(r) driver 2.00.00.151 64-bit

Driver returns 'LONG VARCHAR' for SQL_DESC_TYPE_NAME for 'blob sub_type text' column. Should return 'blob sub_type text' (same as from ::SQLGetTypeInfo for the data type)

Example,

create table test_data_type (
  col_sql_wchar CHAR(20) CHARACTER SET UNICODE_FSS,
  col_sql_wvarchar VARCHAR(20) CHARACTER SET UNICODE_FSS,
  col_sql_wlongvarchar BLOB SUB_TYPE TEXT CHARACTER SET UNICODE_FSS,
  col_sql_longvarchar BLOB SUB_TYPE TEXT,
  col_sql_longvarbinary blob
)
        // type_name
        rc = SQLColAttribute(hstmt,
                             nCol,
                             SQL_DESC_TYPE_NAME,
                             pRow->type_name,
                             sizeof(pRow->type_name),
                             &nLen,
                             NULL);
faridz made changes - 14/Oct/11 08:37 PM
Description Firebird/Interbase(r) driver 2.00.00.151 64-bit

Driver returns 'LONG VARCHAR' for SQL_DESC_TYPE_NAME for 'blob sub_type text' column. Should return 'blob sub_type text' (same as from ::SQLGetTypeInfo for the data type)

Example,

create table test_data_type (
  col_sql_wchar CHAR(20) CHARACTER SET UNICODE_FSS,
  col_sql_wvarchar VARCHAR(20) CHARACTER SET UNICODE_FSS,
  col_sql_wlongvarchar BLOB SUB_TYPE TEXT CHARACTER SET UNICODE_FSS,
  col_sql_longvarchar BLOB SUB_TYPE TEXT,
  col_sql_longvarbinary blob
)
        // type_name
        rc = SQLColAttribute(hstmt,
                             nCol,
                             SQL_DESC_TYPE_NAME,
                             pRow->type_name,
                             sizeof(pRow->type_name),
                             &nLen,
                             NULL);
Firebird/Interbase(r) driver 2.00.00.151 64-bit

Driver returns 'LONG VARCHAR' for SQL_DESC_TYPE_NAME for 'blob sub_type text' column. Should return 'blob sub_type text' (same as from ::SQLGetTypeInfo for the data type)

Example,

create table test_data_type (
  col_sql_wchar char(20) character set unicode_fss,
  col_sql_wvarchar varchar(20) character set unicode_fss,
  col_sql_wlongvarchar blob sub_type text character set unicode_fss,
  col_sql_longvarchar blob sub_type text,
  col_sql_longvarbinary blob
)
        // type_name
        rc = SQLColAttribute(hstmt,
                             nCol,
                             SQL_DESC_TYPE_NAME,
                             pRow->type_name,
                             sizeof(pRow->type_name),
                             &nLen,
                             NULL);
faridz added a comment - 14/Oct/11 08:45 PM
sql data type number for column 3 from SQL_DESC_CONCISE_TYPE / SQL_DESC_TYPE appears wrong (should say SQL_WLONGVARCHAR instead of SQL_LONGVARCHAR).

faridz made changes - 14/Oct/11 08:45 PM
Attachment screen3.jpg [ 12020 ]
Alexander Potapchenko made changes - 18/Aug/12 07:31 AM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 2.0.1 [ 10430 ]
Resolution Fixed [ 1 ]
Alexander Potapchenko made changes - 18/Aug/12 07:31 AM
Status Resolved [ 5 ] Closed [ 6 ]