Menu

#451 ServerVersion will not throw exception after connection is closed, and No any information is returned

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

According the to spec,we have:
{noformat}
Gets a string that contains the version of the instance of SQL Server to which the client is connected.
Namespace: System.Data.SqlClient
Assembly: System.Data (in System.Data.dll)
Syntax
C#C++F#VB
[BrowsableAttribute(false)]
public override string ServerVersion { get; }
Property Value
Type: System.String
The version of the instance of SQL Server.
Exceptions
Exception Condition
InvalidOperationException
The connection is closed.
ServerVersion was called while the returned Task was not completed and the connection was not opened after a call to OpenAsync.
{noformat}

so if connection is closed, exception should be returned.but currently, no exception is returned, and also no any value is ruturned

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.