File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
DataCommander/.Net-5.0/Providers/DataCommander.Providers.SqlServer2 Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -285,17 +285,17 @@ public override async Task OpenAsync(CancellationToken cancellationToken)
285285
286286 if ( ! cancellationToken . IsCancellationRequested )
287287 {
288- const string commandText = @"select @@servername,@@spid
288+ _spid = ( short ) _sqlConnection . ServerProcessId ;
289+
290+ const string commandText = @"select @@servername
289291set arithabort on" ;
290292
291293 var executor = DbCommandExecutorFactory . Create ( _sqlConnection ) ;
292294 var item = executor . ExecuteReader ( new ExecuteReaderRequest ( commandText ) , 1 , dataRecord => new
293295 {
294- ServerName = dataRecord . GetString ( 0 ) ,
295- Spid = dataRecord . GetInt16 ( 1 )
296+ ServerName = dataRecord . GetString ( 0 )
296297 } ) . First ( ) ;
297298 _serverName = item . ServerName ;
298- _spid = item . Spid ;
299299 }
300300 }
301301
You can’t perform that action at this time.
0 commit comments