SqlServer adapter mangling id column data

My venture in trying to use freetds with odbc did get me going, but I've hit a wall.

Once in a while (read about 40% of the time) .. the row id's get transformed into these huge integers

eg: http://hyde:3500/blog/show/3 -> /blog/edit/7957695013524078595

And this is just using simple scaffolding. I dont see this on postgres.

Anyone have any clues ?

I did notice however that i don't see this problem if I run rails on windows, BUT .. the migrations are broken and the schema file simply has error messages for each table.