2012年9月13日 星期四

informix 序號欄位取值

.net 中,如何取得informix table 新增後serial column  的流水號,然後再傳給另一個table進行使用

--建立測試表
create table  bevtest
    ( col1 serial,
      col2 varchar(50) 
    );

begin work;

insert into bevtest values(0,'test');


--此行需緊接著insert into table 後執行
select dbinfo('sqlca.sqlerrd1') as sn from empty into temp tmpsn with no log;

insert into bevtest select 0,sn||' this is sn"  from tmpsn;

drop table tmpsn;

commit work;

沒有留言:

張貼留言

publish error allowDefinition='MachineToApplication'

一個老舊的aspx web form專案,調了一些功能建置成功,但進行部署時顯示以下錯誤。 在應用程式層級之外使用註冊為 allowDefinition='MachineToApplication' 的區段發生錯誤。錯誤的原因可能是虛擬目錄尚未在 IIS 中設定為...