Prev | Current Page 70 | Next

Kevin Marshall, Chad Pytel, and Jon Yurek

"Pro Active Record: Databases with Ruby and Rails"


autocommit: Optional parameter to turn the autocommit feature of SQL Server on or off.
Valid values are true and false. If this parameter is omitted, the adapter defaults to true.
The following example shows how to open an Active Record database connection for SQL
Server:
ActiveRecord::Base.establish_connection(:adapter => "sqlserver",
:database => "test", :username => "kevin", :password => "test",
:host => "www.yourdbserver.com")
Sybase Parameters
The minimum Sybase requirements are the adapter and the database parameters. Here is the
complete list of parameters to consider:
adapter: Specifies that this is connection information for a Sybase database. The value
should be sybase.
database: The name of the database that you are attempting to connect to.
host: Optional parameter containing the domain name of the machine that hosts your
database.
username: Optional parameter containing the username of the user as whom you wish to
connect to the database.
password: Optional parameter containing the password of the user as whom you wish to
connect to the database.


Pages:
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82