Thank you very much, that solves my problem. Eduard
On 12/2/05, Stephan Herrlinger <[EMAIL PROTECTED]> wrote: > > Hi, > > try this > > > cursor = session.sql("select * from messages where msgno > 0") > for row in cursor: > value_1 = row[0] > value_2 = row[1] > .... > > or > > statement = session.prepare("select * from messages where msgno > ?") > cursor = statement.execute([0]) > for row in cursor: > value_1 = row[0] > value_2 = row[1] > ... > > > if you want to read only one row, use: > > row = cursor.first() # row is None if statement returns no result > > best regards, > Stephan > > > Eduards Mihelovics wrote: > > >Hi, > >I am using MaxDB 7.6 with python. I expect that it should be possible to > >pass parameters to SQL queries like this: > > > >cursor = session.cursor () > >cursor.execute ('select * from messages where msgno > ?', [0]) > > > >However, my sapdb session does not have cursor() method. Anyone can > >tell me, what method returns a cursor? Or maybe you could point me to > >some documentation on sapdb packages? > >I connect to get a session using sdb.sql.connect(). > > > >Thanks, Eduard > > > > > > > > > -- > Mit freundlichen Grüßen, > > Stephan Herrlinger > Softwareentwickler > > TRANSPOREON GmbH & Co. KG > heisinger str. 12 > 89437 kempten > fon +49 [0]831 5758 554 > fax +49 [0]831 5758 569 > [EMAIL PROTECTED] > www.transporeon.com > > >