sougatamondal / migratordotnet

Automatically exported from code.google.com/p/migratordotnet
0 stars 0 forks source link

DbType.XML for MS SQL Server 2005. #69

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add a column of type DbType.XML to a MS SQL Server 2005.

What is the expected output? What do you see instead?
I expect the column to get added. Instead I get the error:
"Dialect does not support DbType.XML".

What version of the product are you using? On what operating system? With
what .NET implementation/version?
From SVN (120).

What database and version are you seeing this issue on?
MS SQL Server 2005 Express.

Please provide any additional information below.
A simple workaround (that works for me) is to add:
RegisterColumnType(DbType.Xml, "XML");
to the file Migrator.Providers\Impl\SqlServer\SqlServerDialect.cs

I hope this information helps you.

PS. Great framework you got here. Really useful and easy to work with.

Original issue reported on code.google.com by oscar.fi...@gmail.com on 19 Sep 2008 at 12:17

GoogleCodeExporter commented 8 years ago

Original comment by geoffl...@gmail.com on 22 Dec 2008 at 5:07

GoogleCodeExporter commented 8 years ago
@oscar,geofflane - the fix should should be done on SqlServer2005Dialect class 
rather 
than SqlServerDialect. Currently the codebase on trunk for SqlServer2005Dialect 
has 
this this line "RegisterColumnType(DbType.Xml, 1073741823, "XML");" which is 
causing 
this issue. The fix is to replace the above line with 
RegisterColumnType(DbType.Xml, 
"XML");

Cheers
Babu

Original comment by Babu.Ann...@gmail.com on 12 Feb 2009 at 1:24

GoogleCodeExporter commented 8 years ago
SVN 131
Fixed by removing the minlength parameter which was probably a copy-and-paste 
error from the line above.

Original comment by geoffl...@gmail.com on 14 Feb 2009 at 7:58