# DBI:ODBC-Question

**URL:** <https://rubytalk.org/t/dbi-odbc-question/8887>\
**Category:** ruby-talk\
**Created:** [18 November 2003 11:15 UTC](https://rubytalk.org/t/dbi-odbc-question/8887 "2003-11-18T11:15:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oliver\_Osterholz](https://avatars.discourse-cdn.com/v4/letter/o/e0b2c6/32.png) [@Oliver\_Osterholz](https://rubytalk.org/u/Oliver_Osterholz)\
**Post date:** [18 November 2003 11:15 UTC](https://rubytalk.org/t/dbi-odbc-question/8887/1 "2003-11-18T11:15:39Z")

</div>

Hi,

I’m trying to execute a prepared statement several times:

dbh=DBI.connect(“dbi:ODBC:TESTDB”, “test”, “test”)

sth=dbh.prepare(“select \* from z\_da where entitaet\_c = ?”)

sth.execute("egpa ")

sth.execute("kbpa ")

On the second execute i get the Message:

DBI::DatabaseError: S1010 (0) [Oracle][ODBC]Function sequence error.

D:/Programme/ruby/lib/ruby/site\_ruby/1.8/DBD/ODBC/ODBC.rb:204:in `execute’

D:/Programme/ruby/lib/ruby/site\_ruby/1.8/dbi/dbi.rb:743:in `execute’

Does anybody know what’s wrong here? I guess I miss something important.

Another problem is that since the db-field entitaet\_c is!  
defined as char(20) I have to write

sth.execute("egpa ") to get results. I didn’t expect that since this works fine:

dbh.execute(“select \* from z\_da where entitaet\_c=‘egpa’”)

thank you for your help

Oliver

> **···**
>
> * * *
> 
> Horoskop, Comics, VIPs, Wetter, Sport und Lotto im [WEB.DE](http://WEB.DE) Screensaver1.2  
> Kostenlos downloaden: [**http://screensaver.web.de/?mc=021110**](http://screensaver.web.de/?mc=021110)
