Hello Hans, there is the same bug in 7.4 as Thomas Lorenz reports in message 'RE: probs with update after fetch' The UPDATE WHERE CURRENT OF doesn't work for ESQL/C Version 7.3 and 7.4. Other applications are not affected. We will fixed this in the next version. If it is possible for you to make a new precompiler runtime library, you can got the necessary changes. (One Module vpr01SQl.c)
Regards Burkhard > -----Original Message----- > From: Hans Groschwitz [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 2:13 PM > To: [EMAIL PROTECTED] > Subject: SapDB 7.4 ESQL/C problems with UPDATE ... WHERE CURRENT OF > > > Hi netters, > has anyone got experience with ESQL/C? > > While porting a working application from Informix to SapDB I get an > error -7026 although everything seems right to me... Below > some snips of my > loggings: > > > -------------------------------------------------------------- > ----------- > SqlStmt=[INSERT INTO TAS ( loesch_kz ,mandant ,tabid ,version ,release > ,entry_id ,gueltig_von ,gueltig_bis ,anl_dat ,anl_user > ,aen_dat ,aen_user > ,loe_dat ,loe_user ,entry_content ) VALUES ( :tas_loesch_kz > ,:tas_mandant > ,:tas_tabid ,:tas_version ,:tas_release ,:tas_entry_id > ,:tas_gueltig_von > ,:tas_gueltig_bis ,:tas_anl_dat ,:tas_anl_user ,:tas_aen_dat > ,:tas_aen_user > ,:tas_loe_dat ,:tas_loe_user ,:tas_entry_content )] > sqlcode=(0) [] > > SqlStmt=[DECLARE TAS_110DB_CURS CURSOR FOR SELECT loesch_kz > ,mandant ,tabid > ,version ,release ,entry_id ,gueltig_von ,gueltig_bis > ,anl_dat ,anl_user > ,aen_dat ,aen_user ,loe_dat ,loe_user ,entry_content FROM TAS WHERE > loesch_kz = :loesch_kz AND mandant = :mandant AND tabid = > :tabid AND version > = :version AND release = :release AND entry_id = :entry_id FOR UPDATE] > sqlcode=(0) [] > > SqlStmt=[OPEN TAS_110DB_CURS] > sqlcode=(0) [] > > SqlStmt=[FETCH TAS_110DB_CURS INTO :tas_loesch_kz > ,:tas_mandant ,:tas_tabid > ,:tas_version ,:tas_release ,:tas_entry_id ,:tas_gueltig_von > ,:tas_gueltig_bis ,:tas_anl_dat ,:tas_anl_user ,:tas_aen_dat > ,:tas_aen_user > ,:tas_loe_dat ,:tas_loe_user ,:tas_entry_content] > sqlcode=(0) [] > > SqlStmt=[UPDATE TAS SET loesch_kz = :tas_loesch_kz ,mandant = > :tas_mandant > ,tabid = :tas_tabid ,version = :tas_version ,release = :tas_release > ,entry_id = :tas_entry_id ,gueltig_von = :tas_gueltig_von > ,gueltig_bis = > :tas_gueltig_bis ,anl_dat = :tas_anl_dat ,anl_user = > :tas_anl_user ,aen_dat > = :tas_aen_dat ,aen_user = :tas_aen_user ,loe_dat = > :tas_loe_dat ,loe_user = > :tas_loe_user ,entry_content = :tas_entry_content WHERE CURRENT OF > TAS_110DB_CURS] > sqlcode=(-7026) [SQL statement not allowed without previous FETCH] > -------------------------------------------------------------- > ----------- > > > Btw.: isolation levels 1 and 3 get the same results; > PKs are (loesch_kz, mandant, entry_id). > > > For short: > 1. successfully INSERT a new row > 2. DECLARE CURSOR FOR SELECT FOR UPDATE in a way, that only > this new row > matches. > 3. OPEN CURSOR succeeds. > 4. FETCH succeeds. > 5. UPDATE WHERE CURRENT OF fails. > > Why? > > Any hint is welcome. Tnx in advance. > > --------------------------------------------------- > Dr. Hans Groschwitz > boom GmbH, Walhallastr. 100, D-32108 Bad Salzuflen > Tel. +49 (0) 5222 9868 62 > Fax. +49 (0) 5222 9868 99 > [EMAIL PROTECTED] > www.boom-gmbh.de > > _______________________________________________ > sapdb.general mailing list > [EMAIL PROTECTED] > http://listserv.sap.com/mailman/listinfo/sapdb.general > _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
