It seems that 4294967295, the max value for an unsigned int, is not large
enough. Is there  an issue with using bigint or storing the value in char
format?

-----Original Message-----
From: John A. Sullivan III [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2003 7:18 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Problems retrieveing int unsigned fields


        We are building a large GPL'd application to manage network security
(firewalls, VPN, etc - http://iscs.sourceforge.net) using Trolltech's Qt
and their database drivers to our MySQL backend.  We originally thought
this was a Qt problem but it now appears to be a MySQL problem.
        We store the binary equivalent of dotted decimal IP addresses as int
unsigned.  We write and retrieve the variables to the database with
unsigned long int variables from our Qt application.
        The variables appear to be written correctly to the database - at
least
when we query them with the mysql client.  However, when we retrieve
them, the Qt Variant class is not able to convert them to UInt values if
they are larger than the maximum value of a signed int.  Values that can
fit into an unsigned int are returned properly.  Large values always
return 0, i.e., unable to convert the returned value to an unsigned
int.  We have the same results if we try to return the value as a
string.
        If we change the database field to bigint, all works fine.  Any
ideas
what the problem may be?
        We are using MySQL 3.23.56 and Qt 3.1.1.  My test station is fully
patched RedHat 9.0.  Please pardon the cross post but I'm sure this is
of interest to Qt database developers.
-- 
John A. Sullivan III
Chief Technology Officer
Nexus Management
+1 207-985-7880
[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to