Model.update() fails in SQL Server 2000 #578

Closed
stubotnik opened this Issue Nov 1, 2012 · 3 comments

Comments

Projects
None yet
2 participants

Hi,

I'm not sure if SQL Server 2000 is officially supported (it does work for the most part) but...

I can't update Sequel models via update() (or save() for previously loaded models).

The generated SQL looks like this:

UPDATE TOP 1 [MYTABLE] SET [FOO] = 'BAR' WHERE ([MYTABLEID] = 1)

The "TOP 1" is invalid syntax in SQL Server 2000.

Is that kind of limiting required in some circumstances? Or could it be ditched for model updates?

Thanks!
Stu

Owner

jeremyevans commented Nov 1, 2012

Microsoft SQL Server 2000 is not officially supported (2005+ is), but I'm not opposed to fixing issues. Can you try the patch at http://pastie.org/5166959 and let me know if it fixes the issue?

Yes, that fixes it. Excellent.

Thanks for the fast response Jeremy!

Stu

Owner

jeremyevans commented Nov 1, 2012

Unfortunately, this just missed the 3.41.0 release, but it will be included in the next version. Thanks for testing!

@jeremyevans jeremyevans closed this Nov 1, 2012

jeremyevans added a commit that referenced this issue Nov 1, 2012

Make Dataset#update not use a limit (TOP) on Microsoft SQL Server 2000 (
Fixes #578)

This fixes Model#update, since model instances datasets use a
limit of 1 by default.  Note that Microsoft SQL Server 2000
is not fully supported, but simple things like this can still
be fixed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment