Problem with RunMigrations in SimpleRepository Example – Subsonic 3

subsonicsubsonic3

I downloaded today Subsonic 3 and tried out the examples. I am having a problem with the SimpleRepository example and I wondered if anyone else has had this. In the HomeController there is a defintion as follows:

 public HomeController() {
            _repo = new SimpleRepository("Blog");
        }

I wanted to enable the migrations and so changed it to this:

 public HomeController() {
            _repo = new SimpleRepository("Blog", SimpleRepositoryOptions.RunMigrations);
        }

However, when this runs it causes an error – stating an issue "String or binary data would be truncated.".

If it makes a difference, the version of VS is 2008 (with the GDR applied)

This is still an issue in the latest 3.0.0.1 and .2 downloads..

Best Answer

You get this error message if the migration you are trying to run would edit/truncate data in your database.

Do you have sql profiler available? That way you can see the sql statement. If you don't have sql profiler available you will need to download the source and use debug to see the actual sql statement that it is trying to execute.

Related Topic