search for: identity_insert

Displaying 3 results from an estimated 3 matches for "identity_insert".

2006 Feb 01
5
Sybase ctlib Adapter
...as I could tell, the SQL for db2, mysql, postgresql, and sqlserver use #1, while firebird, oci, and sqlite use #2. Just guessing tho. In case #1, insert() would work as is for Sybase, but the fixtures bail since they try to explicitly set the id''s. You can override this with SET IDENTITY_INSERT, but I''m not sure how to hook into the fixtures to flip this on and off. This would be my preferred approach. In case #2, the fixtures work fine, but insert() fails because of the missing id value. I assume I''d have to generate my own id, e.g,. with max() + 1? It doesn...
2006 Dec 29
4
Strange HABTM behavior against SQL Server (AR 1.14.4)
...ue is equal to the warning_id value. The id columns in jobs_warnings should start at 1 since id is an identity column. And, since there are three distinct warnings, the 4th insert fails with a duplicate key failure. Here is a piece of the development log from running my app: SQL (0.080000) SET IDENTITY_INSERT jobs_warnings ON SQL (0.080000) SELECT @@IDENTITY AS Ident SQL (0.080000) INSERT INTO jobs_warnings ([JobReferenceNumber], [id], [warning_id]) VALUES (551, 3, 3) I believe the id from the warnings table is being selected and then used as the id value for the join table. Is this a bug in the S...
2010 Jan 03
24
SQLServer on Rails
Does any one know how to setup SQLserver with ruby1.9. It was working on an earlier version and now nothing works! I have installed the gems dbi ,dbd-odbc and activerecord-odbc-adapter and can connect in straight Ruby. However, using rails with database.yml nothing works! I hosed everything and reinstalled rails and now, I get Win32/Parite virus on ruby.exe. Any ideas? I''m losing