Issue Details (XML | Word | Printable)

Key: ODBC-133
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Alexander Potapchenko
Reporter: Gregori Arjona
Votes: 0
Watchers: 0
Operations

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

ODBC v 2.0.0151 returns wrong type of colum in calculated field.

Created: 24/Nov/11 06:28 PM   Updated: 31/May/12 04:55 PM
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 2.0.1

File Attachments: 1. File SQL.LOG (37 kB)
2. File SQL3.LOG (24 kB)
3. File test.prg (0.9 kB)

Environment: Firebird 2.1.5 (snapshot build) ,Windows 2003 32bit Server, Windows XP Client, Visual Foxpro 8, ODBC 2.0.0151


 Description  « Hide
Test table:

CREATE TABLE TEST (
    ID INTEGER NOT NULL,
    QUANTITY1 INTEGER NOT NULL,
    QUANTITY2 SMALLINT NOT NULL,
    QUANTITY3 NUMERIC(15,2) NOT NULL,
    QUANTITY4 DOUBLE PRECISION NOT NULL
);

data:


INSERT INTO TEST (ID, QUANTITY1, QUANTITY2, QUANTITY3, QUANTITY4) VALUES (1, 1, 2, 3, 4);
INSERT INTO TEST (ID, QUANTITY1, QUANTITY2, QUANTITY3, QUANTITY4) VALUES (2, 22, 34, 23, 12);

Calling this select, odbc returns wrong type of column Q1 and Q2

SELECT SUM(QUANTITY1) AS Q1,SUM(QUANTITY2) AS Q2,SUM(QUANTITY3) AS Q3,SUM(QUANTITY4) AS Q4 FROM TEST

Obc returns q1 and q2 as string

This workaround fix this problem.

SELECT CAST(SUM(QUANTITY1) AS INTEGER) AS Q1,CAST(SUM(QUANTITY2) AS INTEGER) AS Q2,SUM(QUANTITY3) AS Q3,SUM(QUANTITY4) AS Q4 FROM TEST





 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no subversion log entries for this issue yet.