Hello all I am trying to generate a scaffold for a MS SQL database via the ADO adapter (complete environment info below). I have not problems when I run ''generate model Subscriber'' + ''generate controller Subscriber'' and then go in and connect the scaffold by hand - everything works as advertised (error message below). I would like to have the scaffold code if possible, but when the scaffold generator hits the error with the database, it stops before it is completed. Note I have tried having the DB login be just a ''Data Writer'' and a ''Data Reader'', and as an ''Owner'' of the database, same error both ways. Again, the login to SQL works fine for creating, viewing and posting changes when I do not use the ''scaffold'' generator. Is it possible that the scaffold script is doing something that works on other databases but is incompatible with MS SQL? Thanks in advance for any help, - Erin -------------------------- ERROR message start ... overwrite app/views/subscribers/edit.rhtml? [Ynaq] y force app/views/subscribers/edit.rhtml Open OLE error code:80004005 in Microsoft OLE DB Provider for SQL Server [DBNMPNTW]ConnectionOpen (CreateFile()). HRESULT error code:0x80020009 Exception occurred. -------------------------- end -------------------------- Environment Ruby 1.8.2, Rails 0.11.1, Windows, ADO Adapater, MS SQL Server Standard 8.00.760(SP3) User: Ruby newbie, many years experience scripting, beginner MS SQL user --------------------------- ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/
Erin Clerico <erin@...> writes:> > > Open > OLE error code:80004005 in Microsoft OLE DB Provider for SQL Server > [DBNMPNTW]ConnectionOpen (CreateFile()). > HRESULT error code:0x80020009 > Exception occurred. > -------------------------- end > > -------------------------- Environment > Ruby 1.8.2, Rails 0.11.1, Windows, ADO Adapater, MS SQL Server Standard > 8.00.760(SP3) >1: what does your database.yaml look like? I had many troubles getting the dbi connection string right. 2: what error do you get when you manually add? MyController < AbstractApplicationController scaffold :mymodel Peter Fitzgibbons
> > OLE error code:80004005 in Microsoft OLE DB Provider for SQL Server > > [DBNMPNTW]ConnectionOpen (CreateFile()). > > HRESULT error code:0x80020009 > > Exception occurred. > > -------------------------- end > > > > -------------------------- Environment > > Ruby 1.8.2, Rails 0.11.1, Windows, ADO Adapater, MS SQL Server Standard > > 8.00.760(SP3) > > > 1: what does your database.yaml look like? I had many troubles getting the > dbi > connection string right.Thank you Peter I took the example on this page to mean that the complex connection string was no longer needed: http://wiki.rubyonrails.com/rails/show/HowtoConnectToMicrosoftSQLServer (names changed to protect the innocent) development: adapter: sqlserver database: theHOWTtest host: dbHost.domain.org username: bopeep password: password test: adapter: sqlserver database: theHOWTtest host: dbHost.domain.org username: bopeep password: password production: adapter: sqlserver database: theHOWTtest host: dbHost.domain.org username: bopeep password: password> > 2: what error do you get when you manually add? > MyController < AbstractApplicationController > > scaffold :mymodelI''m not 100% sure where and when to add this. I took an already functioning controller, in this case ''howt\app\controllers\subscriber_controller.rb'' (can''t be right) before I ran ''generate scaffold Subscriber'' - which of course made a new controller with the plural title ''subscribers_controller.rb''. I get the exact same error. Keep in mind I get the full CRUD working properly when I don''t go the ''generate scaffold'' route. Thank you. -Erin Clerico> > > Peter Fitzgibbons > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >------------------------------------------------- This mail sent through IMP: http://horde.org/imp/