similar to: sqlsever, scaffold and set_primary_key

Displaying 20 results from an estimated 8000 matches similar to: "sqlsever, scaffold and set_primary_key"

2007 Apr 17
0
set_primary_key issue
Hi: I am new to the ruby and rails. What I am tried to do is to create a scaffold based on an existing table in a MS SQL Server database. Before I used the set_primary_key method, edit and show does not work in the generated code. Rails displayed the list of the records ok, but can not determine the id for each record. Create a new record does work properly, however. After I used the
2006 Mar 03
0
AR::Base.pluralize_table_names doesnt work with scaffold generator, right?
Hi! The script/generator scaffold for models doesnt respect (source in) this config/environment.rb setup, right? Because I can put in there ActiveRecord::Base.pluralize_table_names = false but when I run a command like ruby script/generate scaffold model Something then it throws an error saying that my database scheme doesnt have a Something. However there is a table called something. If I
2006 Jun 28
3
observe_field and radio button... does not work?
I try to catch click event on radio button, but nothing is executed.... Tested with RoR 1.1.2 and 1.1.3. What am I doing wrong? <%= radio_button_tag(:city, ''Dublin'') %> <%= observe_field(:citi, :frequency => 0.5, :on => ''click'', :with => "''city='' +
2006 Feb 08
1
why sqlserver column with ''user_id'' can not display in rails scaffold?
Hi, I have a table with columns : id,user_id,nickname,create_time. and i create my rails application , with scaffold, it can not display user_id column, others are correct, Why? -- Best Regards, Caiwangqin http://www.uuzone.com Mobile: +8613951787088 Tel: +86025-84818086 ext 233 Fax: +86025-84814993 -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Jun 14
0
Mssql Multiple Database Access Error
Hi All, I am having a problem to access multiple databases with mssql I am running Ruby 1.8.4 and Rails 1.1 on Windows 2000 Advanced Server. I am simply trying to integrate the application I wrote before for Oracle to Mssql. The application works perfectly with Oracle with the installed driver OCI8. The app retrives data based on a search criteria from those databases. I followed the directions
2008 Dec 22
3
how to use set_primary_key?
We are trying to use set_primary_key to cause an existing rails db to use a different primary key. This works find for accessing existing data, but gives an error when we try to add a new record, as it seems to still be accessing the record by the default id field at that point. Are there other changes we need to make to get an alternate primary key working? Thanks, Ken
2006 Jul 10
0
ajax scaffold problem
Hi, I am using ajax_scaffold to generate against a model backed by atable on SQLServer... It creates all the stuff, and I can list the items in my table... But, the "Edit" and "Create New" buttons dont work... The strange thing is that the problem occurs when I edit the ajax_scaffold generated controller with before_filter/set_charset... I try to set the charset of pages
2006 Jun 29
0
Ajax scaffold and SQL Server
I noticed the comment thread on this: http://ajaxscaffold.16bugs.com/bugs/show/1435 indicated that the issue lies within the sqlserver adapter and that it will be ''left up to them'' to fix. Who is them and is anyone authoring the fix? -th Tim Heuer phone (602) 405-4567 | messenger tim@timheuer.com <mailto:tim@timheuer.com> | blog: http://timheuer.com/blog/
2009 Jun 08
2
Connecting to SQLServer
New to rails. Installed rails on my XP desktop, and setup my first app that will use an existing SQLServer database. I am able to connect to SQLServer using odbc with following code. require ''rubygems'' require ''ActiveRecord'' ActiveRecord::Base.establish_connection( :adapter => ''sqlserver'', :mode => ''odbc'', :dsn
2005 Jun 16
0
Pagination error on SQLSERVER
I get the following error when trying to use the scaffold generated list action against a SQLSERVER database. The problem appears to lie in the pagination code generated by scaffold. If I replace the pagination line with: @names = Name.find( :all) the error goes away. Is there a better solution? -Larry ----- Error code shown below ------ NoMethodError in It_systems#index undefined method
2006 Apr 20
1
error on stpexec : ROR on Linux with SQLServer Connection
So I got my rails app to connect to the SQLServer via ODBC, and I can model/scaffold, yada yada.. but when I need to exec a stored proc using sql_server.rb I get undefined local variable or method `connection'' how can that be, if I can connect for everthing else? thanks -- Posted via http://www.ruby-forum.com/.
2006 May 30
1
rake db_schema_import on vanilla schema.rb
Hi all, I dumped my schema from SQLServer 2000 without any problems. I then tried to "rake db_schema_import" on MySQL 4. To do this i changed my database.yml settings to use the mysql adapter (as it was set to use sqlsever before) and attempted the import. I haven''t changed a thing in the schema.rb script and, even though I do have generated a migration, I think I
2006 Nov 04
0
any recommendations for handling a non autoincrement primary key
Hey everyone, I''m working on an application that has a table with a nice natural primary key. Outside of the rails world it would be *the* primary key. I would prefer to use this natural primary key and define associations that use it. I''ve done so but the problem is that my form for entering a record in this table is currently failing. I''ve used
2006 Feb 28
0
ActiveRecord: Legacy primary keys
Hi, I''m building a frontend for a legacy schema, with tables like this: CREATE TABLE `types` ( `a_type_cd` varchar(6) NOT NULL default '''', `a_type` varchar(30) NOT NULL default '''', PRIMARY KEY (`a_type_cd`) ); The primary key is specified by the user (not auto-generated), and needs to be updateable. I create the following a base class to
2007 Aug 29
0
Re: How to model large SqlServer database
Thanks for the response - looks like I am going to have to bite the bullet and get on with it. From a Rails perspective, these databases are a mess, in fact from a SQL Server perspective they are a mess and the company knows it, what they won''t do is use some resource to clean them up. >From some initial testing, the framework seems to be ignoring the set_primary_key setting that I
2006 Apr 05
0
[SPAM] Problem with scaffolding on test setup
Yet another newbie question here. My setup is thus: I have lighty running with scgi (working fine) on windows XP sp 2. Rails 1.1 and ruby 1.8.x. The server and scgi are working. I know this because I can get a test page to work easily enough. I did the following: ruby script\generate model Recipe [following the Rolling with Rails Tutorial] ruby script\generate controller Recipe I also
2006 Apr 26
1
List shows always first page
Hello! I''m a beginner of rails. I made a simple test project with rails 1.1.2 and ruby 1.8.2 on Windows XP. DB is SQLServer 7.0. I''m connecting the server thru ODBC. I created a table named "users" with about 10 columns. I inserted 1000 sample records. I created a scaffold for user model and login controller for it using the script. Everything''s fine
2006 Jan 18
3
Documentation for scaffold / views
Apparently a scaffold creates at least one instance variable for views to use, and if I override the scaffold then I must also explicitly create that instance variable for the view. I''d like to know exactly what work is performed by the scaffold so that I can know this when over-riding the view. (OR, is it that the controller makes these variables available by default?..) EXAMPLE:
2006 Apr 24
3
quick q on script/generate scaffold
I want a scaffold to manager both products and users. To get the products scaffold I used script/generate scaffold Product Admin if I use, script/generate scaffold User Admin will it overwrite my product admin controller? Would I be better off doing script/generate scaffold User User_Admin or something? -- Posted via http://www.ruby-forum.com/.
2006 Jun 29
0
Ajax Scaffold for a application started using win32-process module.
Hi, I have an RoR application(parent) which is use to kick off other RoR applications(ajax scaffold based). I use win32-process Open4.popen4() to start the RoR applications. Untill recently I was using normal scaffold feature of Rails, and recently I migrated to Ajax Scaffold; After moving on to Ajax scaffold, when I try to start a RoR from my parent RoR, the application do get started, when I