unexpected token: when + bug in sqleditor

Bart Pietercil bart.pietercil at gmail.com
Thu Sep 20 14:12:19 CDT 2007


Hi List,

1) what is wrong with this stored procedure:

create or replace procedure spBuildUserTypes()
begin
	DECLARE mylastrecid Long;
	insert into tbl_typelists(created_by,typelistname) values  
('spBuildUserTypes','usertypes');
	set mylastrecid = select recid FROM tbl_typelists where typelistname  
= 'usertypes';
	insert into tbl_typelistvalues 
(displayname,listvalue,objptr_typelist) values ('active',1,mylastrecid);
	insert into tbl_typelistvalues 
(displayname,listvalue,objptr_typelist) values ('deactivated', 
2,mylastrecid);
	insert into tbl_typelistvalues 
(displayname,listvalue,objptr_typelist) values ('blocked', 
3,mylastrecid);
exception
	when others then
		print 'something went wrong'
end;

trying to execute this from sqleditor gives

Error: Kernel error: 0x71000. line 10:2: unexpected token: when


have taken the syntax for the exception from the WIKI

I have to add that a first version is already stored in the db with  
the same name (so replace would be working)


2) in the sqleditor when using autocomplete I have to hit return when  
the autocomplete is correct (the word I want is selected). When I do  
this the insertion point jumps to another (not always the next) line  
(when there is already a line after the line being edited). Bug?


Bart


More information about the Valentina mailing list