parent
56bd02798f
commit
609bd2b3f6
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
' <autogenerated/>
|
||||
Option Strict Off
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
<Assembly: Global.System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName:=".NET Framework 4.5")>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="ImgToFile.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
|
||||
</startup>
|
||||
<userSettings>
|
||||
<ImgToFile.My.MySettings>
|
||||
<setting name="EDOKA_Connection" serializeAs="String">
|
||||
<value>Data Source=shu00;Initial Catalog=edoka;Persist Security Info=False;workstation id =;packet size=4096;User ID=sa;Password=*shu29</value>
|
||||
</setting>
|
||||
<setting name="FilePath" serializeAs="String">
|
||||
<value>k:\edoka\imgtofile\</value>
|
||||
</setting>
|
||||
</ImgToFile.My.MySettings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{26B7CBBD-9C07-47F9-A65A-23A89FD0331E}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<StartupObject>ImgToFile.Module1</StartupObject>
|
||||
<RootNamespace>ImgToFile</RootNamespace>
|
||||
<AssemblyName>ImgToFile</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Console</MyType>
|
||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>ImgToFile.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>ImgToFile.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="db\clsConnectionProvider.vb" />
|
||||
<Compile Include="db\clsDBInteractionBase.vb" />
|
||||
<Compile Include="db\clsdbzugriff.vb" />
|
||||
<Compile Include="db\db_connection.vb" />
|
||||
<Compile Include="globals.vb" />
|
||||
<Compile Include="Module1.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
</Project>
|
||||
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>false</MySubMain>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<ApplicationType>2</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@ -0,0 +1,12 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="EDOKA_Connection" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">Data Source=shu00;Initial Catalog=edoka;Persist Security Info=False;workstation id =;packet size=4096;User ID=sa;Password=*shu29</Value>
|
||||
</Setting>
|
||||
<Setting Name="FilePath" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">k:\edoka\imgtofile\</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
Binary file not shown.
Binary file not shown.
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="ImgToFile.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
|
||||
</startup>
|
||||
<userSettings>
|
||||
<ImgToFile.My.MySettings>
|
||||
<setting name="EDOKA_Connection" serializeAs="String">
|
||||
<value>Data Source=shu00;Initial Catalog=edoka;Persist Security Info=False;workstation id =;packet size=4096;User ID=sa;Password=*shu29</value>
|
||||
</setting>
|
||||
<setting name="FilePath" serializeAs="String">
|
||||
<value>k:\edoka\imgtofile\</value>
|
||||
</setting>
|
||||
</ImgToFile.My.MySettings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
Binary file not shown.
@ -0,0 +1,289 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Connection Provider class for Database connection sharing
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 00:06:25
|
||||
' // This class implements IDisposable.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Configuration
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Collections
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: provides a SqlConnection object which can be shared among data-access tier objects
|
||||
' /// to provide a way to do ADO.NET transaction coding without the hassling with SqlConnection objects
|
||||
' /// on a high level.
|
||||
' /// </summary>
|
||||
Public Class clsConnectionProvider
|
||||
Implements IDisposable
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_scoDBConnection As SqlConnection
|
||||
Private m_bIsTransactionPending, m_bIsDisposed As Boolean
|
||||
Private m_stCurrentTransaction As SqlTransaction
|
||||
Private m_alSavePoints As ArrayList
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Public Sub New()
|
||||
' // Init the class
|
||||
InitClass()
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the IDispose' method Dispose.
|
||||
' /// </summary>
|
||||
Overloads Public Sub Dispose() Implements IDisposable.Dispose
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the Dispose functionality.
|
||||
' /// </summary>
|
||||
Overridable Overloads Protected Sub Dispose(ByVal bIsDisposing As Boolean)
|
||||
' // Check to see if Dispose has already been called.
|
||||
If Not m_bIsDisposed Then
|
||||
If bIsDisposing Then
|
||||
' // Dispose managed resources.
|
||||
If Not (m_stCurrentTransaction Is Nothing) Then
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
End If
|
||||
If Not (m_scoDBConnection Is Nothing) Then
|
||||
' // closing the connection will abort (rollback) any pending transactions
|
||||
m_scoDBConnection.Close()
|
||||
m_scoDBConnection.Dispose()
|
||||
m_scoDBConnection = Nothing
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
m_bIsDisposed = True
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Initializes class members.
|
||||
' /// </summary>
|
||||
Private Sub InitClass()
|
||||
' // Create all the objects and initialize other members.
|
||||
m_scoDBConnection = new SqlConnection()
|
||||
m_bIsDisposed = False
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_bIsTransactionPending = False
|
||||
m_alSavePoints = new ArrayList()
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Opens the connection object.
|
||||
' /// </summary>
|
||||
' /// <returns>True, if succeeded, otherwise an Exception exception is thrown.</returns>
|
||||
Public Function OpenConnection() As Boolean
|
||||
Try
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) > 0 Then
|
||||
' // It's already open.
|
||||
Throw New Exception("OpenConnection::Connection is already open.")
|
||||
End If
|
||||
m_scoDBConnection.Open()
|
||||
m_bIsTransactionPending = False
|
||||
m_alSavePoints.Clear()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Starts a new ADO.NET transaction using the open connection object of this class.
|
||||
' /// </summary>
|
||||
' /// <param name="sTransactionName">Name of the transaction to start</param>
|
||||
' /// <returns>True, if transaction is started correctly, otherwise an Exception exception is thrown</returns>
|
||||
Public Function BeginTransaction(sTransactionName As String) As Boolean
|
||||
Try
|
||||
If m_bIsTransactionPending Then
|
||||
' // no nested transactions allowed.
|
||||
Throw New Exception("BeginTransaction::Already transaction pending. Nesting not allowed")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("BeginTransaction::Connection is not open.")
|
||||
End If
|
||||
' // begin the transaction and store the transaction object.
|
||||
m_stCurrentTransaction = m_scoDBConnection.BeginTransaction(IsolationLevel.ReadCommitted, sTransactionName)
|
||||
m_bIsTransactionPending = True
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Commits a pending transaction on the open connection object of this class.
|
||||
' /// </summary>
|
||||
' /// <returns>True, if commit was succesful, or an Exception exception is thrown</returns>
|
||||
Public Function CommitTransaction() As Boolean
|
||||
Try
|
||||
If Not m_bIsTransactionPending Then
|
||||
' // no transaction pending
|
||||
Throw New Exception("CommitTransaction::No transaction pending.")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("CommitTransaction::Connection is not open.")
|
||||
End if
|
||||
' // commit the transaction
|
||||
m_stCurrentTransaction.Commit()
|
||||
m_bIsTransactionPending = False
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_alSavePoints.Clear()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Rolls back a pending transaction on the open connection object of this class,
|
||||
' /// or rolls back to the savepoint with the given name. Savepoints are created with SaveTransaction().
|
||||
' /// </summary>
|
||||
' /// <param name="sTransactionToRollback">Name of transaction to roll back. Can be name of savepoint</param>
|
||||
' /// <returns>True, if rollback was succesful, or an Exception exception is thrown</returns>
|
||||
Public Function RollbackTransaction(sTransactionToRollback As String) As Boolean
|
||||
Try
|
||||
If Not m_bIsTransactionPending Then
|
||||
' // no transaction pending
|
||||
Throw New Exception("RollbackTransaction::No transaction pending.")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("RollbackTransaction::Connection is not open.")
|
||||
End If
|
||||
' // rollback the transaction
|
||||
m_stCurrentTransaction.Rollback(sTransactionToRollback)
|
||||
' // if this wasn't a savepoint, we've rolled back the complete transaction, so we
|
||||
' // can clean it up.
|
||||
If Not m_alSavePoints.Contains(sTransactionToRollback) Then
|
||||
' // it's not a savepoint
|
||||
m_bIsTransactionPending = False
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_alSavePoints.Clear()
|
||||
End If
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Saves a pending transaction on the open connection object of this class to a 'savepoint'
|
||||
' /// with the given name.
|
||||
' /// When a rollback is issued, the caller can rollback to this savepoint or roll back the complete transaction.
|
||||
' /// </summary>
|
||||
' /// <param name="sSavePointName">Name of the savepoint to store the current transaction under.</param>
|
||||
' /// <returns>True, if save was succesful, or an Exception exception is thrown</returns>
|
||||
Public Function SaveTransaction(sSavePointName As String) As Boolean
|
||||
Try
|
||||
If Not m_bIsTransactionPending Then
|
||||
' // no transaction pending
|
||||
Throw New Exception("SaveTransaction::No transaction pending.")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("SaveTransaction::Connection is not open.")
|
||||
End If
|
||||
' // save the transaction
|
||||
m_stCurrentTransaction.Save(sSavePointName)
|
||||
' // Store the savepoint in the list.
|
||||
m_alSavePoints.Add(sSavePointName)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Closes the open connection. Depending on bCommitPendingTransactions, a pending
|
||||
' /// transaction is commited, or aborted.
|
||||
' /// </summary>
|
||||
' /// <param name="bCommitPendingTransaction">Flag for what to do when a transaction is still pending. True
|
||||
' /// will commit the current transaction, False will abort (rollback) the complete current transaction.</param>
|
||||
' /// <returns>True, if close was succesful, False if connection was already closed, or an Exception exception is thrown when
|
||||
' /// an error occurs</returns>
|
||||
Public Function CloseConnection(bCommitPendingTransaction As Boolean) As Boolean
|
||||
Try
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // No open connection
|
||||
Return False
|
||||
End If
|
||||
If m_bIsTransactionPending Then
|
||||
If bCommitPendingTransaction Then
|
||||
' // Commit the pending transaction
|
||||
m_stCurrentTransaction.Commit()
|
||||
Else
|
||||
' // Rollback the pending transaction
|
||||
m_stCurrentTransaction.Rollback()
|
||||
End If
|
||||
m_bIsTransactionPending = False
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_alSavePoints.Clear()
|
||||
End If
|
||||
' // close the connection
|
||||
m_scoDBConnection.Close()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public ReadOnly Property stCurrentTransaction() As SqlTransaction
|
||||
Get
|
||||
Return m_stCurrentTransaction
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Public ReadOnly Property bIsTransactionPending() As Boolean
|
||||
Get
|
||||
Return m_bIsTransactionPending
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Public ReadOnly Property scoDBConnection() As SqlConnection
|
||||
Get
|
||||
Return m_scoDBConnection
|
||||
End Get
|
||||
End Property
|
||||
Public WriteOnly Property sConnectionString() As String
|
||||
Set (ByVal Value As String)
|
||||
m_scoDBConnection.ConnectionString = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
@ -0,0 +1,202 @@
|
||||
' //////////////////////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Base class for Database Interaction.
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 00:06:25
|
||||
' // Because this class implements IDisposable, derived classes shouldn't do so.
|
||||
' //////////////////////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Configuration
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Data.SqlTypes
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Error Enums used by this LLBL library.
|
||||
' /// </summary>
|
||||
Public Enum LLBLError
|
||||
AllOk
|
||||
' // Add more here (check the comma's!)
|
||||
End Enum
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: General interface of the API generated. Contains only common methods of all classes.
|
||||
' /// </summary>
|
||||
Public Interface ICommonDBAccess
|
||||
Function Insert() As Boolean
|
||||
Function Update() As Boolean
|
||||
Function Delete() As Boolean
|
||||
Function SelectOne() As DataTable
|
||||
Function SelectAll() As DataTable
|
||||
End Interface
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Abstract base class for Database Interaction classes.
|
||||
' /// </summary>
|
||||
Public MustInherit Class clsDBInteractionBase
|
||||
Implements IDisposable
|
||||
Implements ICommonDBAccess
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Protected m_scoMainConnection As SqlConnection
|
||||
Protected m_iErrorCode As SqlInt32
|
||||
Protected m_bMainConnectionIsCreatedLocal As Boolean
|
||||
Protected m_cpMainConnectionProvider As clsConnectionProvider
|
||||
Private m_sConnectionString As String
|
||||
Private m_bIsDisposed As Boolean
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Initialize the class' members.
|
||||
InitClass()
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Initializes class members.
|
||||
' /// </summary>
|
||||
Private Sub InitClass()
|
||||
' // create all the objects and initialize other members.
|
||||
m_scoMainConnection = new SqlConnection()
|
||||
m_bMainConnectionIsCreatedLocal = True
|
||||
m_cpMainConnectionProvider = Nothing
|
||||
m_iErrorCode = New SqlInt32(LLBLError.AllOk)
|
||||
m_bIsDisposed = False
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the IDispose' method Dispose.
|
||||
' /// </summary>
|
||||
Overloads Public Sub Dispose() Implements IDisposable.Dispose
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the Dispose functionality.
|
||||
' /// </summary>
|
||||
Overridable Overloads Protected Sub Dispose(ByVal bIsDisposing As Boolean)
|
||||
' // Check to see if Dispose has already been called.
|
||||
If Not m_bIsDisposed Then
|
||||
If bIsDisposing Then
|
||||
' // Dispose managed resources.
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Object is created in this class, so destroy it here.
|
||||
m_scoMainConnection.Close()
|
||||
m_scoMainConnection.Dispose()
|
||||
m_bMainConnectionIsCreatedLocal = True
|
||||
End If
|
||||
m_cpMainConnectionProvider = Nothing
|
||||
m_scoMainConnection = Nothing
|
||||
End If
|
||||
End If
|
||||
m_bIsDisposed = True
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.Insert() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function Insert() As Boolean Implements ICommonDBAccess.Insert
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.Delete() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function Delete() As Boolean Implements ICommonDBAccess.Delete
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.Update() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function Update() As Boolean Implements ICommonDBAccess.Update
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.SelectOne() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function SelectOne() As DataTable Implements ICommonDBAccess.SelectOne
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.SelectAll() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function SelectAll() As DataTable Implements ICommonDBAccess.SelectAll
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public WriteOnly Property cpMainConnectionProvider() As clsConnectionProvider
|
||||
Set(ByVal Value As clsConnectionProvider)
|
||||
If Value Is Nothing Then
|
||||
' // Invalid value
|
||||
Throw New ArgumentNullException("cpMainConnectionProvider", "Nothing passed as value to this property which is not allowed.")
|
||||
End If
|
||||
|
||||
' // A connection provider object is passed to this class.
|
||||
' // Retrieve the SqlConnection object, if present and create a
|
||||
' // reference to it. If there is already a MainConnection object
|
||||
' // referenced by the membervar, destroy that one or simply
|
||||
' // remove the reference, based on the flag.
|
||||
If Not (m_scoMainConnection Is Nothing) Then
|
||||
' // First get rid of current connection object. Caller is responsible
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Is local created object, close it and dispose it.
|
||||
m_scoMainConnection.Close()
|
||||
m_scoMainConnection.Dispose()
|
||||
End If
|
||||
' // Remove reference.
|
||||
m_scoMainConnection = Nothing
|
||||
End If
|
||||
m_cpMainConnectionProvider = CType(Value, clsConnectionProvider)
|
||||
m_scoMainConnection = m_cpMainConnectionProvider.scoDBConnection
|
||||
m_bMainConnectionIsCreatedLocal = False
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public ReadOnly Property iErrorCode() As SqlInt32
|
||||
Get
|
||||
Return m_iErrorCode
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Public Property sConnectionString() As String
|
||||
Get
|
||||
Return m_sConnectionString
|
||||
End Get
|
||||
Set (ByVal Value As String)
|
||||
m_sConnectionString = Value
|
||||
m_scoMainConnection.ConnectionString = m_sConnectionString
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
@ -0,0 +1,19 @@
|
||||
Imports System.ComponentModel
|
||||
Imports Microsoft.VisualBasic
|
||||
|
||||
Namespace edokadb
|
||||
|
||||
Public Class DB_Connection
|
||||
Shared Sub New()
|
||||
'Edoka
|
||||
|
||||
sConnectionString_edoka = My.Settings.EDOKA_Connection
|
||||
Globals.sConnectionString_edoka = sConnectionString_edoka
|
||||
|
||||
'Journale
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
' <autogenerated/>
|
||||
Option Strict Off
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
<Assembly: Global.System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6", FrameworkDisplayName:=".NET Framework 4.6")>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
d1a3d4188cfa3151ff25e5022637869d8ab8f857
|
||||
@ -0,0 +1,11 @@
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\obj\Debug\ImgToFile.vbproj.AssemblyReference.cache
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\obj\Debug\ImgToFile.Resources.resources
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\obj\Debug\ImgToFile.vbproj.GenerateResource.cache
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\obj\Debug\ImgToFile.vbproj.CoreCompileInputs.cache
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\bin\Debug\ImgToFile.exe.config
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\bin\Debug\ImgToFile.exe
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\bin\Debug\ImgToFile.pdb
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\bin\Debug\ImgToFile.xml
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\obj\Debug\ImgToFile.exe
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\obj\Debug\ImgToFile.xml
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\obj\Debug\ImgToFile.pdb
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
44b08d7bf43be774c311a044a1c686ff613aa9da
|
||||
04e3427731c69fd65ebee69d452207c09cd73b17
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue