Initial commit
This commit is contained in:
32
BinData/Backup/AssemblyInfo.vb
Normal file
32
BinData/Backup/AssemblyInfo.vb
Normal file
@@ -0,0 +1,32 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Allgemeine Informationen über eine Assembly werden über die folgende
|
||||
' Attributgruppe gesteuert. Ändern Sie diese Attributwerte, um Informationen,
|
||||
' die mit einer Assembly verknüpft sind, zu bearbeiten.
|
||||
|
||||
' Die Werte der Assemblyattribute überprüfen
|
||||
|
||||
<Assembly: AssemblyTitle("")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("")>
|
||||
<Assembly: AssemblyCopyright("")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: CLSCompliant(True)>
|
||||
|
||||
'Die folgende GUID ist für die ID der Typbibliothek, wenn dieses Projekt in COM angezeigt wird
|
||||
<Assembly: Guid("B0A5B8B4-7BC5-4ED8-9D14-258AE451263D")>
|
||||
|
||||
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
'
|
||||
' Haupversion
|
||||
' Nebenversion
|
||||
' Buildnummer
|
||||
' Revisionsnummer
|
||||
'
|
||||
' Sie können alle Werte angeben oder auf die standardmäßigen Build- und Revisionsnummern
|
||||
' zurückgreifen, indem Sie '*' wie unten angezeigt verwenden:
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.*")>
|
||||
19
BinData/Backup/BinData.sln
Normal file
19
BinData/Backup/BinData.sln
Normal file
@@ -0,0 +1,19 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "BinData", "BinData.vbproj", "{39CE7F3A-2043-4238-96C7-BD2C30946223}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{39CE7F3A-2043-4238-96C7-BD2C30946223}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{39CE7F3A-2043-4238-96C7-BD2C30946223}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{39CE7F3A-2043-4238-96C7-BD2C30946223}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{39CE7F3A-2043-4238-96C7-BD2C30946223}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
BIN
BinData/Backup/BinData.suo
Normal file
BIN
BinData/Backup/BinData.suo
Normal file
Binary file not shown.
115
BinData/Backup/BinData.vbproj
Normal file
115
BinData/Backup/BinData.vbproj
Normal file
@@ -0,0 +1,115 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{39CE7F3A-2043-4238-96C7-BD2C30946223}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>BinData</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>
|
||||
</AssemblyOriginatorKeyFile>
|
||||
<AssemblyOriginatorKeyMode>None</AssemblyOriginatorKeyMode>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
<RootNamespace>BinData</RootNamespace>
|
||||
<StartupObject>BinData.Form1</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<MyType>WindowsFormsWithCustomSubMain</MyType>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>BinData.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>BinData.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<Optimize>true</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
|
||||
<DebugType>none</DebugType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<Name>System.Data</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing">
|
||||
<Name>System.Drawing</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms">
|
||||
<Name>System.Windows.Forms</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Drawing" />
|
||||
<Import Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
58
BinData/Backup/BinData.vbproj.user
Normal file
58
BinData/Backup/BinData.vbproj.user
Normal file
@@ -0,0 +1,58 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<LastOpenVersion>7.10.3077</LastOpenVersion>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ReferencePath>
|
||||
</ReferencePath>
|
||||
<CopyProjectDestinationFolder>
|
||||
</CopyProjectDestinationFolder>
|
||||
<CopyProjectUncPath>
|
||||
</CopyProjectUncPath>
|
||||
<CopyProjectOption>0</CopyProjectOption>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
<ProjectTrust>0</ProjectTrust>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<EnableASPDebugging>false</EnableASPDebugging>
|
||||
<EnableASPXDebugging>false</EnableASPXDebugging>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
|
||||
<RemoteDebugEnabled>false</RemoteDebugEnabled>
|
||||
<RemoteDebugMachine>
|
||||
</RemoteDebugMachine>
|
||||
<StartAction>Project</StartAction>
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
<StartPage>
|
||||
</StartPage>
|
||||
<StartProgram>
|
||||
</StartProgram>
|
||||
<StartURL>
|
||||
</StartURL>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<StartWithIE>true</StartWithIE>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<EnableASPDebugging>false</EnableASPDebugging>
|
||||
<EnableASPXDebugging>false</EnableASPXDebugging>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
|
||||
<RemoteDebugEnabled>false</RemoteDebugEnabled>
|
||||
<RemoteDebugMachine>
|
||||
</RemoteDebugMachine>
|
||||
<StartAction>Project</StartAction>
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
<StartPage>
|
||||
</StartPage>
|
||||
<StartProgram>
|
||||
</StartProgram>
|
||||
<StartURL>
|
||||
</StartURL>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<StartWithIE>true</StartWithIE>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
145
BinData/Backup/Form1.resx
Normal file
145
BinData/Backup/Form1.resx
Normal file
@@ -0,0 +1,145 @@
|
||||
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<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" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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>
|
||||
<metadata name="OpenFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="Button1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAIhJREFUOE+1kgsO
|
||||
gCAMQzk6R9vNJot2fNY4SJTEoIvtymOlfLlqrbo+2/4mZMvqqQnEItI8is67hlRI6ca9+yrGd8z2JLvT
|
||||
vSfgpm7AwGU1O+ZkQOmRIkTGKBhwgDF+O7FDtfdjBuhMIcYr5ACRwhOMN7FjMnTvQ5aRJyNu4jClKJ7s
|
||||
6aT/+8MFg3zbUfLgpsoAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="Button2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAIhJREFUOE+1kgsO
|
||||
gCAMQzk6R9vNJot2fNY4SJTEoIvtymOlfLlqrbo+2/4mZMvqqQnEItI8is67hlRI6ca9+yrGd8z2JLvT
|
||||
vSfgpm7AwGU1O+ZkQOmRIkTGKBhwgDF+O7FDtfdjBuhMIcYr5ACRwhOMN7FjMnTvQ5aRJyNu4jClKJ7s
|
||||
6aT/+8MFg3zbUfLgpsoAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="MainMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>149, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
428
BinData/Backup/Form1.vb
Normal file
428
BinData/Backup/Form1.vb
Normal file
@@ -0,0 +1,428 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.IO
|
||||
Public Class Form1
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
#Region " Vom Windows Form Designer generierter Code "
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
' Dieser Aufruf ist für den Windows Form-Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
' Initialisierungen nach dem Aufruf InitializeComponent() hinzufügen
|
||||
|
||||
End Sub
|
||||
|
||||
' Die Form überschreibt den Löschvorgang der Basisklasse, um Komponenten zu bereinigen.
|
||||
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing Then
|
||||
If Not (components Is Nothing) Then
|
||||
components.Dispose()
|
||||
End If
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
' Für Windows Form-Designer erforderlich
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'HINWEIS: Die folgende Prozedur ist für den Windows Form-Designer erforderlich
|
||||
'Sie kann mit dem Windows Form-Designer modifiziert werden.
|
||||
'Verwenden Sie nicht den Code-Editor zur Bearbeitung.
|
||||
Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog
|
||||
Friend WithEvents Button1 As System.Windows.Forms.Button
|
||||
Friend WithEvents Label1 As System.Windows.Forms.Label
|
||||
Friend WithEvents Button2 As System.Windows.Forms.Button
|
||||
Friend WithEvents Label2 As System.Windows.Forms.Label
|
||||
Friend WithEvents TxtTable As System.Windows.Forms.TextBox
|
||||
Friend WithEvents Label3 As System.Windows.Forms.Label
|
||||
Friend WithEvents TxtKeyField As System.Windows.Forms.TextBox
|
||||
Friend WithEvents TxtKeyValue As System.Windows.Forms.TextBox
|
||||
Friend WithEvents KeyFeld As System.Windows.Forms.Label
|
||||
Friend WithEvents Label4 As System.Windows.Forms.Label
|
||||
Friend WithEvents Label5 As System.Windows.Forms.Label
|
||||
Friend WithEvents Button3 As System.Windows.Forms.Button
|
||||
Friend WithEvents Button4 As System.Windows.Forms.Button
|
||||
Friend WithEvents txtConnstring As System.Windows.Forms.TextBox
|
||||
Friend WithEvents txtFilename As System.Windows.Forms.TextBox
|
||||
Friend WithEvents txtBindDatafeld As System.Windows.Forms.TextBox
|
||||
Friend WithEvents cbstring As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
|
||||
Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
|
||||
Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
|
||||
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form1))
|
||||
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog
|
||||
Me.Button1 = New System.Windows.Forms.Button
|
||||
Me.txtConnstring = New System.Windows.Forms.TextBox
|
||||
Me.Label1 = New System.Windows.Forms.Label
|
||||
Me.txtFilename = New System.Windows.Forms.TextBox
|
||||
Me.Button2 = New System.Windows.Forms.Button
|
||||
Me.Label2 = New System.Windows.Forms.Label
|
||||
Me.TxtTable = New System.Windows.Forms.TextBox
|
||||
Me.Label3 = New System.Windows.Forms.Label
|
||||
Me.TxtKeyField = New System.Windows.Forms.TextBox
|
||||
Me.TxtKeyValue = New System.Windows.Forms.TextBox
|
||||
Me.KeyFeld = New System.Windows.Forms.Label
|
||||
Me.Label4 = New System.Windows.Forms.Label
|
||||
Me.txtBindDatafeld = New System.Windows.Forms.TextBox
|
||||
Me.Label5 = New System.Windows.Forms.Label
|
||||
Me.Button3 = New System.Windows.Forms.Button
|
||||
Me.Button4 = New System.Windows.Forms.Button
|
||||
Me.cbstring = New System.Windows.Forms.CheckBox
|
||||
Me.MainMenu1 = New System.Windows.Forms.MainMenu(Me.components)
|
||||
Me.MenuItem1 = New System.Windows.Forms.MenuItem
|
||||
Me.MenuItem2 = New System.Windows.Forms.MenuItem
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Image = CType(resources.GetObject("Button1.Image"), System.Drawing.Image)
|
||||
Me.Button1.Location = New System.Drawing.Point(584, 8)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(24, 24)
|
||||
Me.Button1.TabIndex = 2
|
||||
Me.Button1.Visible = False
|
||||
'
|
||||
'txtConnstring
|
||||
'
|
||||
Me.txtConnstring.Location = New System.Drawing.Point(112, 8)
|
||||
Me.txtConnstring.Name = "txtConnstring"
|
||||
Me.txtConnstring.Size = New System.Drawing.Size(472, 20)
|
||||
Me.txtConnstring.TabIndex = 3
|
||||
Me.txtConnstring.Text = "data source=localhost;initial catalog=edoka;persist security info=false;workstati" & _
|
||||
"on id=;packet size=4096;user id=sa;password=it;"
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.Location = New System.Drawing.Point(8, 8)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(100, 23)
|
||||
Me.Label1.TabIndex = 4
|
||||
Me.Label1.Text = "Connestionstring"
|
||||
'
|
||||
'txtFilename
|
||||
'
|
||||
Me.txtFilename.Location = New System.Drawing.Point(112, 32)
|
||||
Me.txtFilename.Name = "txtFilename"
|
||||
Me.txtFilename.Size = New System.Drawing.Size(472, 20)
|
||||
Me.txtFilename.TabIndex = 5
|
||||
Me.txtFilename.Text = "c:\temp\testdata."
|
||||
'
|
||||
'Button2
|
||||
'
|
||||
Me.Button2.Image = CType(resources.GetObject("Button2.Image"), System.Drawing.Image)
|
||||
Me.Button2.Location = New System.Drawing.Point(584, 32)
|
||||
Me.Button2.Name = "Button2"
|
||||
Me.Button2.Size = New System.Drawing.Size(24, 23)
|
||||
Me.Button2.TabIndex = 6
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.Location = New System.Drawing.Point(8, 32)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(100, 23)
|
||||
Me.Label2.TabIndex = 7
|
||||
Me.Label2.Text = "Dateiname"
|
||||
'
|
||||
'TxtTable
|
||||
'
|
||||
Me.TxtTable.Location = New System.Drawing.Point(112, 80)
|
||||
Me.TxtTable.Name = "TxtTable"
|
||||
Me.TxtTable.Size = New System.Drawing.Size(472, 20)
|
||||
Me.TxtTable.TabIndex = 8
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.Location = New System.Drawing.Point(8, 80)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(100, 23)
|
||||
Me.Label3.TabIndex = 9
|
||||
Me.Label3.Text = "Tabelle"
|
||||
'
|
||||
'TxtKeyField
|
||||
'
|
||||
Me.TxtKeyField.Location = New System.Drawing.Point(112, 104)
|
||||
Me.TxtKeyField.Name = "TxtKeyField"
|
||||
Me.TxtKeyField.Size = New System.Drawing.Size(472, 20)
|
||||
Me.TxtKeyField.TabIndex = 10
|
||||
'
|
||||
'TxtKeyValue
|
||||
'
|
||||
Me.TxtKeyValue.Location = New System.Drawing.Point(112, 128)
|
||||
Me.TxtKeyValue.Name = "TxtKeyValue"
|
||||
Me.TxtKeyValue.Size = New System.Drawing.Size(352, 20)
|
||||
Me.TxtKeyValue.TabIndex = 11
|
||||
'
|
||||
'KeyFeld
|
||||
'
|
||||
Me.KeyFeld.Location = New System.Drawing.Point(8, 104)
|
||||
Me.KeyFeld.Name = "KeyFeld"
|
||||
Me.KeyFeld.Size = New System.Drawing.Size(100, 23)
|
||||
Me.KeyFeld.TabIndex = 12
|
||||
Me.KeyFeld.Text = "Key-Feld"
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.Location = New System.Drawing.Point(8, 128)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(100, 23)
|
||||
Me.Label4.TabIndex = 13
|
||||
Me.Label4.Text = "Key-Value"
|
||||
'
|
||||
'txtBindDatafeld
|
||||
'
|
||||
Me.txtBindDatafeld.Location = New System.Drawing.Point(112, 152)
|
||||
Me.txtBindDatafeld.Name = "txtBindDatafeld"
|
||||
Me.txtBindDatafeld.Size = New System.Drawing.Size(472, 20)
|
||||
Me.txtBindDatafeld.TabIndex = 14
|
||||
'
|
||||
'Label5
|
||||
'
|
||||
Me.Label5.Location = New System.Drawing.Point(8, 152)
|
||||
Me.Label5.Name = "Label5"
|
||||
Me.Label5.Size = New System.Drawing.Size(100, 23)
|
||||
Me.Label5.TabIndex = 15
|
||||
Me.Label5.Text = "Bin-Datafeld"
|
||||
'
|
||||
'Button3
|
||||
'
|
||||
Me.Button3.Location = New System.Drawing.Point(112, 200)
|
||||
Me.Button3.Name = "Button3"
|
||||
Me.Button3.Size = New System.Drawing.Size(120, 40)
|
||||
Me.Button3.TabIndex = 16
|
||||
Me.Button3.Text = "DB -> Datei"
|
||||
'
|
||||
'Button4
|
||||
'
|
||||
Me.Button4.Location = New System.Drawing.Point(464, 200)
|
||||
Me.Button4.Name = "Button4"
|
||||
Me.Button4.Size = New System.Drawing.Size(120, 40)
|
||||
Me.Button4.TabIndex = 17
|
||||
Me.Button4.Text = "Datei -> DB"
|
||||
'
|
||||
'cbstring
|
||||
'
|
||||
Me.cbstring.Location = New System.Drawing.Point(488, 128)
|
||||
Me.cbstring.Name = "cbstring"
|
||||
Me.cbstring.Size = New System.Drawing.Size(104, 24)
|
||||
Me.cbstring.TabIndex = 19
|
||||
Me.cbstring.Text = "String"
|
||||
'
|
||||
'MainMenu1
|
||||
'
|
||||
Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1})
|
||||
'
|
||||
'MenuItem1
|
||||
'
|
||||
Me.MenuItem1.Index = 0
|
||||
Me.MenuItem1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem2})
|
||||
Me.MenuItem1.Text = "&Datei"
|
||||
'
|
||||
'MenuItem2
|
||||
'
|
||||
Me.MenuItem2.Index = 0
|
||||
Me.MenuItem2.Text = "&Beenden"
|
||||
'
|
||||
'Form1
|
||||
'
|
||||
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
||||
Me.ClientSize = New System.Drawing.Size(624, 249)
|
||||
Me.Controls.Add(Me.cbstring)
|
||||
Me.Controls.Add(Me.Button4)
|
||||
Me.Controls.Add(Me.Button3)
|
||||
Me.Controls.Add(Me.Label5)
|
||||
Me.Controls.Add(Me.txtBindDatafeld)
|
||||
Me.Controls.Add(Me.Label4)
|
||||
Me.Controls.Add(Me.KeyFeld)
|
||||
Me.Controls.Add(Me.TxtKeyValue)
|
||||
Me.Controls.Add(Me.TxtKeyField)
|
||||
Me.Controls.Add(Me.Label3)
|
||||
Me.Controls.Add(Me.TxtTable)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Controls.Add(Me.Button2)
|
||||
Me.Controls.Add(Me.txtFilename)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.txtConnstring)
|
||||
Me.Controls.Add(Me.Button1)
|
||||
Me.Menu = Me.MainMenu1
|
||||
Me.Name = "Form1"
|
||||
Me.Text = "SQL-BinData"
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
|
||||
Load_Data()
|
||||
End Sub
|
||||
|
||||
Private Sub Load_Data()
|
||||
Dim dsdata As New DataSet
|
||||
Dim filename As String = Me.txtFilename.Text
|
||||
Dim sql As String = ""
|
||||
sql = "Select * from " + Me.TxtTable.Text
|
||||
sql = sql & " where " + Me.TxtKeyField.Text
|
||||
sql = sql & "="
|
||||
If Me.cbstring.Checked = True Then sql = sql & "'"
|
||||
sql = sql & Me.TxtKeyValue.Text
|
||||
If Me.cbstring.Checked = True Then sql = sql & "'"
|
||||
Try
|
||||
dsdata.Tables.Clear()
|
||||
Dim connection As New SqlConnection
|
||||
Dim da As New SqlDataAdapter(sql, connection)
|
||||
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(da)
|
||||
Dim ds As New DataSet
|
||||
Try
|
||||
connection.ConnectionString = Me.txtConnstring.Text
|
||||
connection.Open()
|
||||
da.Fill(ds, "Daten")
|
||||
Dim myrow As DataRow
|
||||
If ds.Tables(0).Rows.Count = 0 Then
|
||||
MsgBox("Empfänger konnten nicht geladen werden.")
|
||||
Else
|
||||
If ds.Tables(0).Rows.Count > 1 Then
|
||||
MsgBox("Mehr als ein Datensatz ausgewählt.", MsgBoxStyle.Exclamation)
|
||||
Else
|
||||
Dim i As Integer
|
||||
Dim idatafield As Integer = -1
|
||||
|
||||
For i = 0 To ds.Tables(0).Columns.Count - 1
|
||||
If UCase(ds.Tables(0).Columns(i).Caption) = UCase(Me.txtBindDatafeld.Text) Then
|
||||
idatafield = i
|
||||
End If
|
||||
Next
|
||||
If idatafield > -1 Then
|
||||
myrow = ds.Tables(0).Rows(0)
|
||||
|
||||
Dim MyData() As Byte
|
||||
MyData = myrow.Item(idatafield)
|
||||
Dim K As Long
|
||||
K = UBound(MyData)
|
||||
Dim fs As New FileStream(Me.txtFilename.Text, FileMode.OpenOrCreate, FileAccess.Write)
|
||||
fs.Write(MyData, 0, K)
|
||||
fs.Close()
|
||||
fs = Nothing
|
||||
Else
|
||||
MsgBox("Bin-Datenfeld in der Tabelle nicht vorhanden", MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Ein Fehler ist aufgetreten" + ex.Message)
|
||||
Finally
|
||||
cb = Nothing
|
||||
ds = Nothing
|
||||
da = Nothing
|
||||
connection.Close()
|
||||
connection = Nothing
|
||||
End Try
|
||||
Catch ex As Exception
|
||||
MsgBox("Ein Fehler ist aufgetreten" + ex.Message)
|
||||
Finally
|
||||
dsdata = Nothing
|
||||
End Try
|
||||
MsgBox("Auslesen der Daten erfolgreich beendet.")
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
|
||||
Dim s As String
|
||||
Me.OpenFileDialog1.ShowDialog()
|
||||
If Me.OpenFileDialog1.FileName <> "" Then
|
||||
Me.txtConnstring.Text = ""
|
||||
FileOpen(1, Me.OpenFileDialog1.FileName, OpenMode.Input)
|
||||
While Not EOF(1)
|
||||
Input(1, s)
|
||||
Me.txtConnstring.Text = Me.txtConnstring.Text + s
|
||||
End While
|
||||
FileClose(1)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
|
||||
Me.OpenFileDialog1.ShowDialog()
|
||||
If Me.OpenFileDialog1.FileName <> "" Then Me.txtFilename.Text = Me.OpenFileDialog1.FileName
|
||||
End Sub
|
||||
|
||||
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
|
||||
Save_Data()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub save_data()
|
||||
Dim dsdata As New DataSet
|
||||
Dim filename As String = Me.txtFilename.Text
|
||||
Dim sql As String = ""
|
||||
sql = "Select * from " + Me.TxtTable.Text
|
||||
sql = sql & " where " + Me.TxtKeyField.Text
|
||||
sql = sql & "="
|
||||
If Me.cbstring.Checked = True Then sql = sql & "'"
|
||||
sql = sql & Me.TxtKeyValue.Text
|
||||
If Me.cbstring.Checked = True Then sql = sql & "'"
|
||||
Try
|
||||
dsdata.Tables.Clear()
|
||||
Dim connection As New SqlConnection
|
||||
Dim da As New SqlDataAdapter(sql, connection)
|
||||
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(da)
|
||||
Dim ds As New DataSet
|
||||
Dim fs As New FileStream(filename, FileMode.Open, FileAccess.Read)
|
||||
Dim mydata(fs.Length) As Byte
|
||||
fs.Read(mydata, 0, fs.Length)
|
||||
fs.Close()
|
||||
connection.ConnectionString = Me.txtConnstring.Text
|
||||
connection.Open()
|
||||
da.Fill(ds, "empf")
|
||||
Dim myRow As DataRow
|
||||
If ds.Tables(0).Rows.Count = 0 Then
|
||||
MsgBox("Es wurde kein Daten für den Update selektiert.")
|
||||
Else
|
||||
If ds.Tables(0).Rows.Count > 1 Then
|
||||
MsgBox("Es wurden mehr als 1 Datensatz für den Update selektiert.")
|
||||
Else
|
||||
Dim i As Integer
|
||||
Dim idatafield As Integer = -1
|
||||
|
||||
For i = 0 To ds.Tables(0).Columns.Count - 1
|
||||
If UCase(ds.Tables(0).Columns(i).Caption) = UCase(Me.txtBindDatafeld.Text) Then
|
||||
idatafield = i
|
||||
End If
|
||||
Next
|
||||
|
||||
myRow = ds.Tables(0).Rows(0)
|
||||
myRow.Item(idatafield) = mydata
|
||||
da.Update(ds, "empf")
|
||||
End If
|
||||
End If
|
||||
fs = Nothing
|
||||
cb = Nothing
|
||||
ds = Nothing
|
||||
da = Nothing
|
||||
connection.Close()
|
||||
connection = Nothing
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Es ist ein Fehler aufgetreten." & ex.Message)
|
||||
End Try
|
||||
MsgBox("Speichern der Daten erfolgreich beendet.")
|
||||
End Sub
|
||||
|
||||
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user