![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 4 of 4 total |
![]() |
Mon, May 8 2017 11:26 AM | Permanent Link |
Peter van Mierlo EVENTSOFT | hi
My DBISAM table Country contains two fields : - countryID (autoinc field) - name (string) Primary index on the field CountryID When appending some new values it works, when editing a existing sometimes the error message appears. Any suggestions? Regards Peter |
Mon, May 8 2017 11:41 AM | Permanent Link |
Uli Becker | Peter,
> My DBISAM table Country contains two fields : > - countryID (autoinc field) > - name (string) > > Primary index on the field CountryID > > When appending some new values it works, when editing a existing sometimes the > error message appears. Maybe the same issue as described here: http://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_beta&page=1&msg=237#237 Uli |
Tue, May 9 2017 7:09 AM | Permanent Link |
Peter van Mierlo EVENTSOFT | Hi Uli
Well...it seems the same problem. I also use autoinc + primairy index Did you solve the problem by generate a guid ? Regards Peter Uli Becker wrote: Peter, > My DBISAM table Country contains two fields : > - countryID (autoinc field) > - name (string) > > Primary index on the field CountryID > > When appending some new values it works, when editing a existing sometimes the > error message appears. Maybe the same issue as described here: http://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_beta&page=1&msg=237#237 Uli |
Tue, May 9 2017 7:36 AM | Permanent Link |
Uli Becker | Peter,
> Did you solve the problem by generate a guid ? No, I use integers: on the database side I use a "pool" table that contains the tablename and the current index number. With EWB I send a request to a module which executes this function: CREATE FUNCTION "GetNextID" (IN "FTableName" VARCHAR(100) COLLATE "DEU_CI") RETURNS INTEGER BEGIN DECLARE FOldID, FNewID INTEGER; Execute Immediate 'SELECT NextID INTO ? FROM IDPool WHERE TableName=?' USING FOldID, FTableName; SET FNewID = FOldID + 1; Execute Immediate 'UPDATE IDPool SET NextID=? WHERE TableName=?' USING FNewID, FTableName; RETURN FNewID; END The request returns the new (unique) ID and I can use this ID to insert a record. For the case you want to enter a record manually in your database manager I use a trigger for each of these tables: CREATE TRIGGER "InsertID" BEFORE INSERT ON "Info" BEGIN IF NEWROW.ID IS NULL THEN SET NEWROW.ID = GetNextID('Info'); END IF; END Uli |
This web page was last updated on Tuesday, February 11, 2025 at 11:58 AM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |