function GenID($seqname = 'adodbseq', $start = 1)
        {
                $go = $this->Execute("select * from $seqname");
                if (!$go){
                        $res = $this->Execute("CREATE TABLE $seqname ( ID autoinc( 1 ) ) IN DATABASE");
                        if(!res){
                                print $this->ErrorMsg();
                                return false;
                        }
                }
                $res = $this->Execute("INSERT INTO $seqname VALUES( DEFAULT )");
                if(!$res){
                        print $this->ErrorMsg();
                        return false;
                }
                else{
                        $gen = $this->Execute("SELECT LastAutoInc( STATEMENT ) FROM system.iota");
                        $ret = $gen->fields[0];
                        return $ret;
                }

        }