Fix SQL Designer selecting wrong connection type
This commit is contained in:
parent
85a7064afc
commit
c688219f24
@ -172,6 +172,8 @@ Public Class frmSQL_DESIGNER
|
||||
|
||||
Dim ds As DataSet = ExecuteWithConnection(cmbConnection.SelectedValue, query)
|
||||
|
||||
|
||||
|
||||
If ds IsNot Nothing Then
|
||||
dgvResult.DataSource = ds.Tables(0)
|
||||
End If
|
||||
@ -185,7 +187,7 @@ Public Class frmSQL_DESIGNER
|
||||
|
||||
If connectionString <> "" Then
|
||||
|
||||
If connectionString.StartsWith("Server=") And connectionString.Contains("Database=") Then
|
||||
If connectionString.StartsWith("Server=") And (connectionString.Contains("Database=") Or connectionString.ToUpper.Contains("Initial Catalog=".ToUpper)) Then
|
||||
Dim sqlConnection As SqlClient.SqlConnection
|
||||
Dim sqlCommand As SqlClient.SqlCommand
|
||||
Dim sqlAdapter As New SqlClient.SqlDataAdapter
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user