Modify

#36 closed Bug (Fixed)

MS SQL BigInt masked with 0xFFFFFF00

Reported by: jpoulsen2 Owned by: Valik
Milestone: 3.2.11.1 Component: AutoIt
Version: 3.2.10.0 Severity:
Keywords: Cc:

Description (last modified by Jpm)

When storing an integet value as a bigint, decimal or numeric in MS SQL db using ADODB, the value is stored correctly in the db (verified with DatAdmin 0.8.8). But when the value is returned it seems to be masked with 0xFFFFFF00 resulting in the last byte always being 0. This problem does not occur with the types float and int.

Sample code: see attached file

Attachments (1)

sample.au3 (3.2 KB ) - added by Jpm on Jan 17, 2008 at 3:26:27 PM.

Download all attachments as: .zip

Change History (9)

comment:1 by anonymous, on Jan 14, 2008 at 11:02:59 PM

And here is the output from running the script against my MS SQL Server 2005

CREATE TABLE int_test(ip_addr1 float, ip_addr2 int, ip_addr3 bigint, ip_addr4 decimal(12), ip_addr5 numeric(12))
INSERT INTO int_test VALUES(-1407448780,-1407448780,-1407448780,-1407448780,-1407448780)
INSERT INTO int_test VALUES(1104350679,1104350679,1104350679,1104350679,1104350679)
INSERT INTO int_test VALUES(2130706434,2130706434,2130706434,2130706434,2130706434)
SELECT * FROM int_test
0: -1407448780 - AC1C0934
1: -1407448780 - AC1C0934
2: -1407448832 - AC1C0900
3: -1407448832 - AC1C0900
4: -1407448832 - AC1C0900
0: 1104350679 - 41D30DD7
1: 1104350679 - 41D30DD7
2: 1104350720 - 41D30E00
3: 1104350720 - 41D30E00
4: 1104350720 - 41D30E00
0: 2130706434 - 7F000002
1: 2130706434 - 7F000002
2: 2130706432 - 7F000000
3: 2130706432 - 7F000000
4: 2130706432 - 7F000000

by Jpm, on Jan 17, 2008 at 3:26:27 PM

Attachment: sample.au3 added

comment:2 by Jpm, on Jan 17, 2008 at 3:27:59 PM

Description: modified (diff)

comment:3 by AutoIt User, on Jan 21, 2008 at 8:06:54 PM

The same happens to me using _FileReadToArray / _FileWriteFromArray.
Version: 3.2.10.0

in reply to:  3 ; comment:4 by Jpm, on Jan 28, 2008 at 10:52:46 PM

Replying to AutoIt User:

The same happens to me using _FileReadToArray / _FileWriteFromArray.
Version: 3.2.10.0

are you sure to speak about the ticket subject?
There is no relation between SQLite and those UDF's

in reply to:  4 comment:5 by AutoIt User, on Jan 30, 2008 at 8:43:13 PM

Replying to Jpm:

Replying to AutoIt User:

The same happens to me using _FileReadToArray / _FileWriteFromArray.
Version: 3.2.10.0

are you sure to speak about the ticket subject?
There is no relation between SQLite and those UDF's

It's not releated to ticket subject. Just have similar problems using _FileReadToArray / _FileWriteFromArray. If the first array value was an hexed string (e.g. 0xFFFFFFFFFFF) while saving, the result by reading back was 0 or scrambled data. This behavior seems to be fixed in the 3.2.11 beta, this won't happend anymore.

comment:6 by Valik, on Feb 1, 2008 at 7:11:10 PM

Owner: set to Valik
Status: newaccepted

comment:7 by Valik, on Feb 1, 2008 at 7:36:12 PM

I can confirm everything that's been said by the reporter. I've finally figured out how to get the example script working. I get the same results as the OP and I also verified that the data is stored in the database correctly. The next step is to do some quick debugging to see what the data looks like when it comes in to AutoIt.

comment:8 by Valik, on Feb 2, 2008 at 7:12:28 PM

Milestone: 3.2.11.1
Resolution: fixed
Status: acceptedclosed

Fixed in version: 3.2.11.1

Modify Ticket

Action
as closed The owner will remain Valik.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.