<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to bugs</title><link>https://sourceforge.net/p/dbunit-net/bugs/</link><description>Recent changes to bugs</description><atom:link href="https://sourceforge.net/p/dbunit-net/bugs/feed.rss" rel="self"/><language>en</language><lastBuildDate>Wed, 21 Nov 2007 21:59:03 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/dbunit-net/bugs/feed.rss" rel="self" type="application/rss+xml"/><item><title>SqlServerIdentitySelector fails on SQL Server 2005</title><link>https://sourceforge.net/p/dbunit-net/bugs/1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;When I try using a SqlServerIdentitySelector, it gives an error "InvalidCastException". To correct this, I had to modify the retrieveIdentity method as follows.&lt;/p&gt;
&lt;p&gt;public int retrieveIdentity(IDbConnection connection)&lt;br /&gt;
{&lt;br /&gt;
int id = -1;&lt;br /&gt;
using (IDbCommand cmd = connection.CreateCommand())&lt;br /&gt;
{&lt;br /&gt;
cmd.CommandText = IdentitySelectStatement();&lt;br /&gt;
String str = cmd.ExecuteScalar().ToString();&lt;br /&gt;
if (str != null) &lt;br /&gt;
{&lt;br /&gt;
Int32.TryParse(str, out id);&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
return id;&lt;br /&gt;
}&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 21 Nov 2007 21:59:03 -0000</pubDate><guid>https://sourceforge.net0c394b0dcd78a7297fecc2ca10a287f71fffff09</guid></item></channel></rss>