Where to store SQL Queries in Ruby Console App

Hi
I’m building out a windows console app that talks to SQL Server 2005.
I’m coming from an Access world, where the queries are nicely included
in the front end.

So I’m wondering: what are best practices for storing queries for an
application? I certainly don’t want to hard-code the queries into the
application itself. One idea is to store each query in its own file in
a separate directory and read in those query files on the fly. But I’m
still left wondering if there is a bettery way to this.

Ideas?

Joe M. wrote:

One idea is to store each query in its own file in
a separate directory and read in those query files on the fly.

I’ve used such a method numerous times and it has worked well for me.

David

http://rubyonwindows.blogspot.com
http://rubyonwindows.blogspot.com/search/label/sqlserver

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs