DBI stateHandler bind_param errors

I have a real problem with calling a stored procedure on MS SQL Server
from Ruby-DBI. I have no problems with connections or calling queries.
I can even call the Stored procedure with "exec Test 'test'" and the
stored procedure inserts the value text into a Test table. However, if
I try to use the bind_param to add the input params to a stored
procedure to make my class alitte more friendly it ERRORs.

Connection Successful !!!
Preparing SQL Query: exec Test
Executing SQL Stmt
Error INTERN (0) [RubyODBC]Too much parameters



CODE ____________

      connection_string = "DBI:ODBC:Driver={SQL
      connect( connection_string, @adapter_config["acct_db_user"],
@adapter_config["acct_db_pass"] )
      prepare( "exec Test" )
      bind_param( 1, "Admin1" )
      #puts "Return_Code: " + get_return_code
      #puts "Return_Status: " + get_return_status
    rescue DBI::DatabaseError => e
      puts "Error #{e.errstr}"
      #disconnect from server

  def connect( connection_string, db_user, db_pass )
    @db = DBI.connect( connection_string )

  def disconnect
    @db.disconnect if @db

  def is_connected
    if @db.ping
      puts "Connection Successful !!!"
      puts "Connection FAILED !!!"

  def execute
    puts "Executing SQL Stmt"

  def prepare( query )
    puts "Preparing SQL Query: " + query
    @stmt = @db.prepare( query )

  # attribs is not yet used in this version, but could later be a hash
containing more
  # information like parameter type, etc.
  def bind_param( param, value )
    @stmt.bind_param( param, value, false )
Posted via http://www.ruby-forum.com/.