Skip to content

Commit ee6fd4a

Browse files
committed
release 1.2.4
1 parent 6d582e9 commit ee6fd4a

12 files changed

+324
-317
lines changed

Connection.vb

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,44 @@ Imports System.Data.SqlClient
33
Imports System.Reflection
44

55
Public Class Connection
6-
Inherits Databasic.Connection
7-
8-
Public Overrides ReadOnly Property Provider As DbConnection
9-
Get
10-
Return Me._provider
11-
End Get
12-
End Property
13-
Private _provider As SqlConnection
14-
15-
Public Overrides ReadOnly Property ProviderResource As System.Type = GetType(ProviderResource)
16-
17-
Public Overrides ReadOnly Property ClientName As String = "System.Data.SqlClient"
18-
19-
Public Overrides ReadOnly Property Statement As System.Type = GetType(Statement)
20-
21-
Public Overrides Sub Open(dsn As String)
22-
Me._provider = New SqlConnection(dsn)
23-
Me._provider.Open()
24-
AddHandler Me._provider.InfoMessage, AddressOf Connection.errorHandler
25-
End Sub
26-
27-
Protected Shared Sub errorHandler(sender As Object, args As SqlInfoMessageEventArgs)
28-
Dim sqlErrors As Databasic.SqlErrorsCollection = New SqlErrorsCollection()
29-
For index = 0 To args.Errors.Count - 1
30-
sqlErrors.Add(New Databasic.MsSql.SqlError(args.Errors(index)))
31-
Next
32-
Databasic.Events.RaiseError(sqlErrors)
33-
End Sub
34-
35-
Protected Overrides Function createAndBeginTransaction(Optional transactionName As String = "", Optional isolationLevel As IsolationLevel = IsolationLevel.Unspecified) As Databasic.Transaction
36-
Me.OpenedTransaction = New Transaction() With {
37-
.ConnectionWrapper = Me,
38-
.Instance = Me._provider.BeginTransaction(
39-
isolationLevel, transactionName.Substring(0, Math.Min(transactionName.Length - 1, 32))
40-
)
41-
}
42-
Return Me.OpenedTransaction
43-
End Function
6+
Inherits Databasic.Connection
7+
8+
Public Overrides ReadOnly Property Provider As DbConnection
9+
Get
10+
Return Me._provider
11+
End Get
12+
End Property
13+
Private _provider As SqlConnection
14+
15+
16+
Public Overrides ReadOnly Property ProviderResource As System.Type = GetType(ProviderResource)
17+
18+
Public Overrides ReadOnly Property ClientName As String = "System.Data.SqlClient"
19+
20+
Public Overrides ReadOnly Property Statement As System.Type = GetType(Statement)
21+
22+
Public Overrides Sub Open(dsn As String)
23+
Me._provider = New SqlConnection(dsn)
24+
Me._provider.Open()
25+
AddHandler Me._provider.InfoMessage, AddressOf Connection.errorHandler
26+
End Sub
27+
28+
Protected Shared Sub errorHandler(sender As Object, args As SqlInfoMessageEventArgs)
29+
Dim sqlErrors As Databasic.SqlErrorsCollection = New SqlErrorsCollection()
30+
For index = 0 To args.Errors.Count - 1
31+
sqlErrors.Add(New Databasic.MsSql.SqlError(args.Errors(index)))
32+
Next
33+
Databasic.Events.RaiseError(sqlErrors)
34+
End Sub
35+
36+
Protected Overrides Function createAndBeginTransaction(Optional transactionName As String = "", Optional isolationLevel As IsolationLevel = IsolationLevel.Unspecified) As Databasic.Transaction
37+
Me.OpenedTransaction = New Transaction() With {
38+
.ConnectionWrapper = Me,
39+
.Instance = Me._provider.BeginTransaction(
40+
isolationLevel, transactionName.Substring(0, Math.Min(transactionName.Length - 1, 32))
41+
)
42+
}
43+
Return Me.OpenedTransaction
44+
End Function
4445

4546
End Class

Databasic.MsSql.nuspec

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
33
<metadata minClientVersion="2.6">
4-
<id>Databasic.MsSql</id>
5-
<version>1.2.0.0</version>
6-
<title>Databasic - Microsoft SQL Package</title>
7-
<authors>Tom Flidr</authors>
8-
<owners>Tom Flidr</owners>
9-
<licenseUrl>https://opensource.org/licenses/BSD-3-Clause</licenseUrl>
10-
<projectUrl>https://github.com/databasic-net</projectUrl>
11-
<iconUrl>https://raw.githubusercontent.com/databasic-net/databasic/master/gfx/databasic-icon.ico</iconUrl>
12-
<language>en-US</language>
13-
<requireLicenseAcceptance>false</requireLicenseAcceptance>
14-
<description>
15-
C#/VB.NET database utility to write pure Microsoft SQL queries and load data into environment variables and instances.
16-
</description>
17-
<copyright>Copyright © 2017</copyright>
18-
<tags>microsoft sql tsql mssql database select selecting query queries commands tool utility</tags>
19-
<dependencies>
20-
<!--dependency id="System" version="4.0.0.0" />
4+
<id>Databasic.MsSql</id>
5+
<version>1.2.4.0</version>
6+
<title>Databasic - Microsoft SQL Package</title>
7+
<authors>Tom Flidr</authors>
8+
<owners>Tom Flidr</owners>
9+
<licenseUrl>https://opensource.org/licenses/BSD-3-Clause</licenseUrl>
10+
<projectUrl>https://github.com/databasic-net</projectUrl>
11+
<iconUrl>https://raw.githubusercontent.com/databasic-net/databasic/master/gfx/databasic-icon.ico</iconUrl>
12+
<language>en-US</language>
13+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
14+
<description>
15+
C#/VB.NET database utility to write pure Microsoft SQL queries and load data into environment variables and instances.
16+
</description>
17+
<copyright>Copyright © 2017</copyright>
18+
<tags>microsoft sql tsql mssql database select selecting query queries commands tool utility</tags>
19+
<dependencies>
20+
<!--dependency id="System" version="4.0.0.0" />
2121
<dependency id="System.Core" version="4.0.0.0" />
2222
<dependency id="System.Data" version="4.0.0.0" /-->
23-
<dependency id="Databasic.Core" version="1.2.0.0" />
24-
</dependencies>
25-
<releaseNotes>https://github.com/databasic-net/databasic/releases</releaseNotes>
23+
<dependency id="Databasic.Core" version="1.2.0.0" />
24+
</dependencies>
25+
<releaseNotes>https://github.com/databasic-net/databasic/releases</releaseNotes>
2626
</metadata>
2727
<files>
28-
<file src="content/App.config.install.xdt" target="content/App.config.install.xdt" />
29-
<file src="content/Web.config.install.xdt" target="content/Web.config.install.xdt" />
30-
<file src="content/App.config.uninstall.xdt" target="content/App.config.uninstall.xdt" />
31-
<file src="content/Web.config.uninstall.xdt" target="content/Web.config.uninstall.xdt" />
28+
<file src="content/App.config.install.xdt" target="content/App.config.install.xdt" />
29+
<file src="content/Web.config.install.xdt" target="content/Web.config.install.xdt" />
30+
<file src="content/App.config.uninstall.xdt" target="content/App.config.uninstall.xdt" />
31+
<file src="content/Web.config.uninstall.xdt" target="content/Web.config.uninstall.xdt" />
3232
</files>
3333
</package>

Databasic.MsSql.vbproj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,12 @@
123123
<PostBuildEvent>REM Create a NuGet package for this project and place the .nupkg file in the project's output directory.
124124
REM If you see this in Visual Studio's Error List window, check the Output window's Build tab for the actual error.
125125
ECHO Creating NuGet package in Post-Build event...
126-
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "&amp; '$(ProjectDir)_CreateNewNuGetPackage\DoNotModify\CreateNuGetPackage.ps1' -ProjectFilePath '$(ProjectPath)' -OutputDirectory '$(TargetDir)' -BuildConfiguration '$(ConfigurationName)' -BuildPlatform '$(PlatformName)'"</PostBuildEvent>
126+
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "&amp; '$(ProjectDir)_CreateNewNuGetPackage\DoNotModify\CreateNuGetPackage.ps1' -ProjectFilePath '$(ProjectPath)' -OutputDirectory '$(TargetDir)' -BuildConfiguration '$(ConfigurationName)' -BuildPlatform '$(PlatformName)'"
127+
128+
@set wd=%25cd%25
129+
@cd ../../../Databasic.BuildCommands
130+
@cscript.exe PostBuild.wsf "%25wd%25"
131+
@cd %25wd%25</PostBuildEvent>
127132
</PropertyGroup>
128133
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
129134
Other similar extension points exist, see Microsoft.Common.targets.

My Project/Application.Designer.vb

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

My Project/AssemblyInfo.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ Imports System.Runtime.InteropServices
3434
' by using the '*' as shown below:
3535
' <Assembly: AssemblyVersion("1.0.*")>
3636

37-
<Assembly: AssemblyVersion("1.2.0.0")>
38-
<Assembly: AssemblyFileVersion("1.2.0.0")>
37+
<Assembly: AssemblyVersion("1.2.4.0")>
38+
<Assembly: AssemblyFileVersion("1.2.4.0")>

My Project/Resources.Designer.vb

Lines changed: 51 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)