Hello again, I have just tested that the same code just works for MySql backend. Calling the same cycle after and after always returns data. Do I have to call something else specific to Oracle backend after each execute - fetch cycle? Or is this a bug? Still looking...
Regards, Faik Uygur ________________________________ Kimden: Faik Uygur |SmartSoft [[email protected]] Gönderildi: 19 Temmuz 2013 Cuma 10:47 Kime: [email protected] Bilgi: Halil Ercikan |SmartSoft Konu: [soci-users] Second execute - fetch select cycle does not seem to return data Hello, I am using soci version 3.2.1 with Oracle backend. I am using prepared statements. If a single row selecting statement is called with stmt->execute(true); - select after select works but if a multiple row returning select statement is used and I use "stmt->execute(false) while (stmt->fetch()) ..." the second run of execute-fetch cycle does not return any data. Am i missing something or is this a bug in Oracle backend. I looked for something like cursor reset, row reset if maybe needed but couldn't find anything related. Here is some code that would help to understand the problem: --- MyClass { ... private: shared_ptr<statement> _select; ... } void MyClass::setup() { _select.reset(new statement((_session->prepare << "select " "guid, status, lastupdated, " "func_code, dst_host1, dst_port1 " "from sys_cnn " "where status = 1", into(guid), into(status), into(lastupdated), into(func_code), into(dst_host1), into(dst_port1) ))); } bool MyClass::load() { _select->execute(); while (_select->fetch()) { // use data returned from each fetch } return _session->got_data(); } ---- So first load() call works but second call does not return any rows. Regards, Faik Uygur [cid:[email protected]] Faik Uygur |SmartSoft TEKNİK DANIŞMAN, YAZILIM GELİŞTİRME TECHNICAL CONSULTANT, SOFTWARE DEVELOPMENT İTÜ Ayazağa Kampüsü Teknokent ARI3 K:1 NO:102 34469 Maslak İstanbul - Türkiye www.cardtek.com<http://www.cardtek.com/> P +90 212 328 3331 F +90 212 285 4093 M [cid:[email protected]] Bu e-posta ve muhtemel eklerinde verilen bilgiler kişiye özel ve gizli olup, yalnızca mesajda belirlenen alıcı ile ilgilidir.Size yanlışlıkla ulaşmışsa lütfen göndericiye bilgi veriniz, mesajı siliniz ve içeriğini başka bir kişiye açıklamayınız, herhangi bir ortama kopyalamayınız.Verilen tüm bilgilerin doğruluğu ve bütünlüğünün garantisi verilmemekte olup, önceden bildirilmeksizin değiştirilebilecektir.Bu mesajın içeriği Firmamızın resmi görüşlerini yansıtmayabileceğinden Kartek Kart ve Bilişim Teknolojileri Tic.Ltd.Şti. ( SmartSoft ) hiçbir hukuki sorumluluğu kabul etmez. [cid:[email protected]] Faik Uygur |SmartSoft TEKNİK DANIŞMAN, YAZILIM GELİŞTİRME TECHNICAL CONSULTANT, SOFTWARE DEVELOPMENT İTÜ Ayazağa Kampüsü Teknokent ARI3 K:1 NO:102 34469 Maslak İstanbul - Türkiye www.cardtek.com<http://www.cardtek.com/> P +90 212 328 3331 F +90 212 285 4093 M [cid:[email protected]]
<<inline: image1a19d4.PNG>>
<<inline: imagebff202.PNG>>
<<inline: image87620e.PNG>>
<<inline: imagece85a6.PNG>>
------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________ soci-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/soci-users
