georgiev / rubyfb

ruby/rails Firebird db access library
Other
16 stars 5 forks source link

Connection option hash #5

Closed tuxjobs closed 12 years ago

tuxjobs commented 12 years ago

Hi, is this the propper way to give the attribut sql_role_name to the connect satement? Couldn't find any example how the hash should look like...

db = Database.new('test-server.org:C:\DB\test.fdb') db.connect('Username', 'Passwort',{SQL_ROLE_NAME => "DB_USERS"})

georgiev commented 12 years ago

Your code is correct - that's the way for passing options to connection

tuxjobs commented 12 years ago

hmm... if i use 'SQL_ROLE_NAME' as key - i get 'uninitialized constant SQL_ROLE_NAME'

SQL_ROLE_NAME => uninitialized constant SQL_ROLE_NAME "SQL_ROLE_NAME" => no implicit conversion from nil to integer :sql_role_name => no implicit conversion from nil to integer

georgiev commented 12 years ago

Using fully qualified constant name Rubyfb::Connection::SQL_ROLE_NAME should help.

tuxjobs commented 12 years ago

thx - worked

georgiev commented 12 years ago

Ok - closing