![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi I use database where globalid = 10 and one column is global autoincrement and this type is bigint. Now i can't adding record to this table because i get error - "value 42949674157 out of range destination" ! Why ? This value is inside range for this globalid Fantom |
#3
| ||||
| ||||
|
|
Is it possible you have a trigger on that table that is doing something else with that value? |
|
Otherwise please show your specific information, -versions 10.0.1.3579 -create table statement |
|
-failing insert statement [use `-zr sql+hostvars`] -the database registered option [select db_property( 'GlobalDBID ')] 10 -the current range of values in the table: select max(<gbl_incr_column_name> ) from table; from 42949672961 to 42949674148 |
|
"Fantom" <szczukot (AT) poczta (DOT) onet.pl.skasujto> wrote in message news:47444ae7 (AT) forums-1-dub (DOT) .. Hi I use database where globalid = 10 and one column is global autoincrement and this type is bigint. Now i can't adding record to this table because i get error - "value 42949674157 out of range destination" ! Why ? This value is inside range for this globalid Fantom |
#4
| |||
| |||
|
|
Is it possible you have a trigger on that table that is doing something else with that value? i dont have trigers Otherwise please show your specific information, -versions 10.0.1.3579 -create table statement CREATE TABLE "DBA"."Kasa" ( "Kwota" "smallmoney" NOT NULL ,"Opis" varchar(100) NOT NULL ,"DataKasa" timestamp NOT NULL ,"Typ" smallint NOT NULL ,"ID_Magazyn" smallint NOT NULL ,"NrDokument" integer NULL ,"ID_Kasa" integer NOT NULL DEFAULT global autoincrement ,"ID_Remote" bigint NOT NULL DEFAULT global autoincrement ,PRIMARY KEY ("ID_Remote") ) ALTER TABLE "DBA"."Kasa" ADD UNIQUE ( "ID_Kasa" ) ALTER TABLE "DBA"."Kasa" ADD FOREIGN KEY "Magazyn" ("ID_Magazyn") REFERENCES "DBA"."Magazyn" ("ID_Magazyn") -failing insert statement [use `-zr sql+hostvars`] -the database registered option [select db_property( 'GlobalDBID ')] 10 -the current range of values in the table: select max(<gbl_incr_column_name> ) from table; from 42949672961 to 42949674148 Before i use ASA8. Now i convert this to ASA10. I set SET OPTION PUBLIC.Global_database_id = 10. When i want adding this record in Sybase central thi is work. When i want Fantom "Fantom" <szczukot (AT) poczta (DOT) onet.pl.skasujto> wrote in message news:47444ae7 (AT) forums-1-dub (DOT) .. Hi I use database where globalid = 10 and one column is global autoincrement and this type is bigint. Now i can't adding record to this table because i get error - "value 42949674157 out of range destination" ! Why ? This value is inside range for this globalid Fantom |
#5
| |||
| |||
|
|
Is it possible you have a trigger on that table that is doing something else with that value? i dont have trigers Otherwise please show your specific information, -versions 10.0.1.3579 -create table statement CREATE TABLE "DBA"."Kasa" ( "Kwota" "smallmoney" NOT NULL ,"Opis" varchar(100) NOT NULL ,"DataKasa" timestamp NOT NULL ,"Typ" smallint NOT NULL ,"ID_Magazyn" smallint NOT NULL ,"NrDokument" integer NULL ,"ID_Kasa" integer NOT NULL DEFAULT global autoincrement ,"ID_Remote" bigint NOT NULL DEFAULT global autoincrement ,PRIMARY KEY ("ID_Remote") ) ALTER TABLE "DBA"."Kasa" ADD UNIQUE ( "ID_Kasa" ) ALTER TABLE "DBA"."Kasa" ADD FOREIGN KEY "Magazyn" ("ID_Magazyn") REFERENCES "DBA"."Magazyn" ("ID_Magazyn") -failing insert statement [use `-zr sql+hostvars`] -the database registered option [select db_property( 'GlobalDBID ')] 10 -the current range of values in the table: select max(<gbl_incr_column_name> ) from table; from 42949672961 to 42949674148 Before i use ASA8. Now i convert this to ASA10. I set SET OPTION PUBLIC.Global_database_id = 10. When i want adding this record in Sybase central thi is work. When i want Fantom "Fantom" <szczukot (AT) poczta (DOT) onet.pl.skasujto> wrote in message news:47444ae7 (AT) forums-1-dub (DOT) .. Hi I use database where globalid = 10 and one column is global autoincrement and this type is bigint. Now i can't adding record to this table because i get error - "value 42949674157 out of range destination" ! Why ? This value is inside range for this globalid Fantom |
#6
| |||
| |||
|
|
Two Global Autoincrments? 1 just an INTEGER? I wonder if that is a causitive factor. It not often one has a need to have to autoincrements on the same table (global or not). |
|
No problem running that here ... well past your value. But then again I don't have your foreign key definition since I don't have the other table ("Magazyn") or data in that. "Fantom" <szczukot (AT) poczta (DOT) onet.pl.skasujto> wrote in message news:474548a3$1 (AT) forums-1-dub (DOT) .. Is it possible you have a trigger on that table that is doing something else with that value? i dont have trigers Otherwise please show your specific information, -versions 10.0.1.3579 -create table statement CREATE TABLE "DBA"."Kasa" ( "Kwota" "smallmoney" NOT NULL ,"Opis" varchar(100) NOT NULL ,"DataKasa" timestamp NOT NULL ,"Typ" smallint NOT NULL ,"ID_Magazyn" smallint NOT NULL ,"NrDokument" integer NULL ,"ID_Kasa" integer NOT NULL DEFAULT global autoincrement ,"ID_Remote" bigint NOT NULL DEFAULT global autoincrement ,PRIMARY KEY ("ID_Remote") ) ALTER TABLE "DBA"."Kasa" ADD UNIQUE ( "ID_Kasa" ) ALTER TABLE "DBA"."Kasa" ADD FOREIGN KEY "Magazyn" ("ID_Magazyn") REFERENCES "DBA"."Magazyn" ("ID_Magazyn") -failing insert statement [use `-zr sql+hostvars`] -the database registered option [select db_property( 'GlobalDBID ')] 10 -the current range of values in the table: select max(<gbl_incr_column_name> ) from table; from 42949672961 to 42949674148 Before i use ASA8. Now i convert this to ASA10. I set SET OPTION PUBLIC.Global_database_id = 10. When i want adding this record in Sybase central thi is work. When i want Fantom "Fantom" <szczukot (AT) poczta (DOT) onet.pl.skasujto> wrote in message news:47444ae7 (AT) forums-1-dub (DOT) .. Hi I use database where globalid = 10 and one column is global autoincrement and this type is bigint. Now i can't adding record to this table because i get error - "value 42949674157 out of range destination" ! Why ? This value is inside range for this globalid Fantom |
![]() |
| Thread Tools | |
| Display Modes | |
| |