Menu

#467 [ADO.NET] DBNull.Value should be returned by CUBRIDCommand.ExecuteScalar() when the query result is null

open
nobody
None
5
2013-03-22
2013-03-22
Jira Trac
No

Description:
DBNull.Value should be returned by CUBRIDCommand.ExecuteScalar() when the query result is null. Now CUBRIDCommand.ExecuteScalar() throws an unhandled exception.
Refer to msdn: http://msdn.microsoft.com/en-us/library/system.data.common.dbcommand.executescalar.aspx

Test case is like this:
{noformat}
cmd.CommandText = select * from tablenotexist;
obj = cmd.ExecuteScalar();

Assert.AreEqual(DBNull.Value, obj);
{noformat}

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.