From: grooveska Date: 2007-04-05T06:00:06+09:00 Subject: Re: Ruby + sql server On Mar 30, 6:51 am, "Faby" wrote: > Hi, > I would like to execute a stored procedure using ruby and sql server > 2000 with DBI and ODBC. > Can anyone give me an example on how to do it? > Thanks Here is what worked for me: I made an ODBC System DSN named ruby to the DB & Server I wanted to connect to. so my ruby script looks like this: require "dbi" db = DBI.connect('dbi:ODBC:ruby', 'sa', 'UMsys#07') storedproc = "EXEC createUser @userName=bob, @password=bob" stmt = db.prepare(storedproc) stmt.execute puts "User Created" stmt.finish db.disconnect Hope that helps...