Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What is MSSqlServer 2000's Bigint in powerbuilder 9.0.2?

172 views
Skip to first unread message

Cfauvel

unread,
Aug 9, 2005, 11:10:39 AM8/9/05
to
how does the sqlserver 2000's bigint map to powerbuilder's datatypes?

Long?


Chris Keating (iAnywhere Solutions)

unread,
Aug 9, 2005, 11:47:39 AM8/9/05
to

longlong
A standard datatype that is a 64-bit signed integer in the
range -9223372036854775808 to 9223372036854775807.


"Cfauvel" <TheFa...@verizon.net> wrote in message
news:42f8c76b$1@forums-2-dub...

Cfauvel

unread,
Aug 9, 2005, 3:56:14 PM8/9/05
to
thanks...I think the datawindow may have an issue.

I have two apps, both built on pb9.0.2, one uses the native database driver
for sqlserver, and the other uses the ole-db driver.

after I've created the DWs and look at the columns' data type LongLong is
not an option.

I kinda expected that on the DWs built while connected using the native
database driver, but not while connected using the ole-db driver.


The datatypes I have available for each column are:
String
number
decimal
date
datetime
time
long
ulong


My problem is this.
we want to change the Primarykey of a table to be sqlserver BigInt.

My app needs to retrieve this field as one of many fields in my DW, and when
a user doubleclicks on the row, it populates a variable of type LongLong,
and calls a popup window passing in this large number, retrieves the data
based on this large PK.

I've created a test table test_table (pk_id bigint, mydate varchar(50) )
populated it with the following

9223372036854775800 first peice of data
9223372036854775801 second piece of data
9223372036854775802 third piece of data


Created a stored procedure to retrieve both fields for one record based on
the PK_id.

Created the DW based on the stored procedure and get the PK_id, being
automatically mapped to PB datatype Decimal {0}

tried to retrieve one record using the id 9223372036854775800 and get the
following error.

Select Error: Error Converting data type float to bigint.

Reconnected to the DB using oledb.
re-created the dw based on same procedure and got the Pk_id mapped to
decimal{18} this time

When I try to retrieve the record for 9223372036854775800, I get the
following error:

Select error:SQLSTATE = 22018
Microsoft OLE DB Provider for SQL Server
Error converting data type float to bigint.

I'm starting to think that this thread should be started anew in either the
DW section or Database connectivity section...what do you think

Here are the results for PB10
Created the DW based on the stored procedure and get the PK_id, being
automatically mapped to PB datatype Decimal {0}

When I try to retrieve the record for 9223372036854775800, I get the
following error:

Select error:SQLSTATE = 22018
Microsoft OLE DB Provider for SQL Server
Error converting data type float to bigint.

Other interesting things.
if I retrieve by this id , 922337203685477580, I don't get an error, but I
also don't get any data expected.

here is a matrix of what ids do retrieve from the DB using PB10.0 ,
connected via OLE_DB

pk_id mydata
canretrieve
-------------------- --------------------------------------------------
-----------
9223372036854775800 first peice of data
0
9223372036854775801 second piece of data
0
9223372036854775802 third piece of data
0
922337203685477580 fourth piece of data
0
1 fifth piece of data
1
2147483647 long data type
1
21474836470 10times more than long
1
214748364700 100 times more than long
1
2147483647000 1,000 times more
1
21474836470000 10,000 times more
1
214748364700000 100,000 times more
1
2147483647000000 1,000,000 times more
1
21474836470000000 10,000,000 times more
1
214748364700000000 100,000,000 times more
1
2147483647000000000 1,000,000,000 times more
1
222337203685477580 some number
0
212337203685477580 some other number
0
92233720368547758 real big number
0
22233720368547758 some number minus trailing 0
0
21233720368547758 some number with second digit = 1
0
2223372036854775 some number minus trailing 2 digits
1
9223372036854775 real big number minus trailing digit
0
214748364700000001 100,000,000 times more + 1
0
214748364700001 100,000 times more + 1
1
2147483647000001 1,000,000 times more + 1
0
21474836470000001 10,000,000 times more + 1
0
214748364700009 100,000 times more + 9
1

(27 row(s) affected)

I don't get why I can retrieve data for 2147483647000000000, but not for
2147483647000001


I think there is a bug somewhere.

"Chris Keating (iAnywhere Solutions)" <Spam_NoTha...@iAnywhere.com>
wrote in message news:42f8d017$1@forums-2-dub...

Scott Morris

unread,
Aug 10, 2005, 8:55:05 AM8/10/05
to
0 new messages