home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.os.vms      DEC's VAX* line of computers & VMS.      264,096 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 262,835 of 264,096   
   =?UTF-8?Q?Arne_Vajh=C3=B8j?= to All   
   Re: VMS x86-64 database server   
   10 Jul 25 19:50:05   
   
   From: arne@vajhoej.dk   
      
   On 7/6/2025 6:07 PM, Arne Vajhøj wrote:   
   > But there are some incompatibilities between H2 in   
   > PostgreSQL mode and real PostgreSQL.   
   >   
   > And one of them is that H2 in PostgreSQL mode   
   > does not support server side cursors.   
   >   
   > And embedded SQL without "FETCH cursorname INTO ..."   
   > is like a hotdog without a hotdog sausage!   
      
   If one can live with SELECT INTO then everything   
   is fine (but nobody can).   
      
   #include    
   #include    
   #include    
      
   EXEC SQL INCLUDE SQLCA;   
      
   int main()   
   {   
        EXEC SQL BEGIN DECLARE SECTION;   
        char f2[51];   
        long int f1;   
        char srv[50], un[50], pw[50];   
        EXEC SQL END DECLARE SECTION;   
        strcpy(srv, "tcp:postgresql://localhost:5435/test");   
        strcpy(un, "sa");   
        strcpy(pw, "hemmeligt");   
        EXEC SQL CONNECT TO :srv USER :un USING :pw;   
        f1 = 2;   
        EXEC SQL SELECT f2 INTO :f2 FROM t1 WHERE f1 = :f1;   
        printf("%s\n", f2);   
        return 0;   
   }   
      
   works fine.   
      
   Arne   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca