Skip to content

Commit

Permalink
Change ConnectionString to method
Browse files Browse the repository at this point in the history
  • Loading branch information
spaghettidba committed Dec 6, 2023
1 parent 413fea4 commit 09dae04
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ConvertWorkload/ExtendedEventsEventReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ path nvarchar(4000)

using (var conn = new SqlConnection())
{
conn.ConnectionString = info.ConnectionString;
conn.ConnectionString = info.ConnectionString();
conn.Open();
using (var cmd = conn.CreateCommand())
{
Expand All @@ -72,7 +72,7 @@ path nvarchar(4000)
}
}

reader = new FileTargetXEventDataReader(info.ConnectionString, null, Events, ExtendedEventsWorkloadListener.ServerType.LocalDB);
reader = new FileTargetXEventDataReader(info.ConnectionString(), null, Events, ExtendedEventsWorkloadListener.ServerType.LocalDB);
reader.ReadEvents();
finished = true;

Expand Down
2 changes: 1 addition & 1 deletion ConvertWorkload/LocalDBManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public bool CanConnectToLocalDB()
var info = new SqlConnectionInfo();
info.ServerName = @"(localdb)\MSSQLLocalDB";
info.UseIntegratedSecurity = true;
using (var conn = new SqlConnection(info.ConnectionString + ";Connect Timeout=30;"))
using (var conn = new SqlConnection(info.ConnectionString() + ";Connect Timeout=30;"))
{
conn.Open();
}
Expand Down
4 changes: 2 additions & 2 deletions ConvertWorkload/SqlTraceEventReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ path nvarchar(4000)

using(var conn = new SqlConnection())
{
conn.ConnectionString = info.ConnectionString;
conn.ConnectionString = info.ConnectionString();
conn.Open();
using(var cmd = conn.CreateCommand())
{
Expand All @@ -70,7 +70,7 @@ path nvarchar(4000)
}
}

reader = new FileTraceEventDataReader(info.ConnectionString, Filter, Events);
reader = new FileTraceEventDataReader(info.ConnectionString(), Filter, Events);
reader.ReadEvents();
finished = true;
}
Expand Down

0 comments on commit 09dae04

Please sign in to comment.