search for: gentablea

Displaying 5 results from an estimated 5 matches for "gentablea".

Did you mean: gentableas
2006 Jan 19
4
multiple database in the same actions?
Hi, I read the example in http://wiki.rubyonrails.com/rails/pages/HowtoUseMultipleDatabases, it show us how to connect to other database, each time we start a new action, however, this doesn''t work while you try to connect to two different database within the same action. SO I wonder is it possible to bind to two or more database within the same action???? Thanks you very much Saiho
2006 Jan 26
0
If you want to disconnect a database properly, there is the code:)!!!
...on self.connection.disconnect # disconnect the link with database, it call the newly added methode in postgresql_adapter @connection = nil # remove the connection cached in the ActiveRecord::base class end For the tests, we have used the following code: # first connection GenTableAs.establish_connection(:adapter => "postgresql", :host => "1.2.3.4", :port => 5432, :database => "db1", :username => "dbuser1", :password => "dbuser1") GenTableAs.set_table_name ''table_no_1&...
2006 Jan 13
1
How to disconnect to a database????
...nnection ? The using version ruby-rails are : Rails 0.14.2 and ruby 1.8.3 (2005-09-21) [x86_64-linux] We are running on Linux KDE 3.4, and our database engine is postgresql The following is a code example: #################################################################################### class GenTableAs < ActiveRecord::Base end class GentestController < ApplicationController def index GenTableAs.establish_connection(:adapter => "postgresql", :host => "1.2.3.4", :port => 5432, :database => "gendb", :username => &quo...
2006 Jan 05
7
HOWTO: Combine fields from 2 two tables in 1 object
Hi all, For a dropdownlist (showing "Company - FirstName Lastname'') I want to fill an object @project_contacts with "Name" from table Companies and "Firstname" and "Lastname" from table contacts. Any idea? Regards, Gerard. -- "Who cares if it doesn''t do anything? It was made with our new Triple-Iso-Bifurcated-Krypton-Gate-MOS
2006 Jan 11
0
Connection problem with a generic-runtime-built ActiveRecord::Base
...f.class.column_names() end end this how I use it: class GentestController < ApplicationController def index GenActRec.connectToPSQLDB("1.2.3.4", 5432, "gendb", "dbuser" ,"dbpwd" ) # test create genAClass = GenActRec.buildNewTableClass("GenTableAs","gen_table_as") @name = genAClass.name obj1 = genAClass.new @col1 = obj1.class.column_names() @removedConnection = GenActRec.closeConnection() # should be an error @col2 = obj1.class.column_names() end end Basically, @col2 should be an error, because the connec...