mirror of
https://github.com/romanlryji/EventLogLoader.git
synced 2024-11-24 08:32:52 +02:00
Не заполнялся код метаданного при чтении из SQLite ЖР.
This commit is contained in:
parent
b21cd623bf
commit
e87ec15002
@ -76,7 +76,7 @@
|
|||||||
<GenerateManifests>true</GenerateManifests>
|
<GenerateManifests>true</GenerateManifests>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<SignManifests>true</SignManifests>
|
<SignManifests>false</SignManifests>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
<Reference Include="MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||||
@ -93,6 +93,7 @@
|
|||||||
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.94.1\lib\net20\System.Data.SQLite.Linq.dll</HintPath>
|
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.94.1\lib\net20\System.Data.SQLite.Linq.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Deployment" />
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.ServiceProcess" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -685,7 +685,12 @@ Public Class EventLogLoaderService
|
|||||||
command.Parameters.Add(New SqlParameter("@v9", SqlDbType.Char)).Value = Ev.EventType
|
command.Parameters.Add(New SqlParameter("@v9", SqlDbType.Char)).Value = Ev.EventType
|
||||||
command.Parameters.Add(New SqlParameter("@v10", SqlDbType.VarChar)).Value = Ev.Comment
|
command.Parameters.Add(New SqlParameter("@v10", SqlDbType.VarChar)).Value = Ev.Comment
|
||||||
command.Parameters.Add(New SqlParameter("@v11", SqlDbType.Int)).Value = Ev.MetadataID
|
command.Parameters.Add(New SqlParameter("@v11", SqlDbType.Int)).Value = Ev.MetadataID
|
||||||
|
|
||||||
|
If Ev.DataStructure.Length > 100 Then
|
||||||
|
Ev.DataStructure = Ev.DataStructure.Substring(0, 99)
|
||||||
|
End If
|
||||||
command.Parameters.Add(New SqlParameter("@v12", SqlDbType.Char)).Value = Ev.DataStructure
|
command.Parameters.Add(New SqlParameter("@v12", SqlDbType.Char)).Value = Ev.DataStructure
|
||||||
|
|
||||||
command.Parameters.Add(New SqlParameter("@v13", SqlDbType.VarChar)).Value = Ev.DataString
|
command.Parameters.Add(New SqlParameter("@v13", SqlDbType.VarChar)).Value = Ev.DataString
|
||||||
command.Parameters.Add(New SqlParameter("@v14", SqlDbType.Int)).Value = Ev.ServerID
|
command.Parameters.Add(New SqlParameter("@v14", SqlDbType.Int)).Value = Ev.ServerID
|
||||||
command.Parameters.Add(New SqlParameter("@v15", SqlDbType.Int)).Value = Ev.MainPortID
|
command.Parameters.Add(New SqlParameter("@v15", SqlDbType.Int)).Value = Ev.MainPortID
|
||||||
@ -1226,7 +1231,15 @@ Public Class EventLogLoaderService
|
|||||||
OneEvent.EventID = rs("eventCode")
|
OneEvent.EventID = rs("eventCode")
|
||||||
OneEvent.Comment = rs("comment")
|
OneEvent.Comment = rs("comment")
|
||||||
'OneEvent.MetadataID = rs("metadataCodes")
|
'OneEvent.MetadataID = rs("metadataCodes")
|
||||||
OneEvent.MetadataID = 0
|
Dim MDCodes As String = rs("metadataCodes")
|
||||||
|
If String.IsNullOrEmpty(MDCodes) Then
|
||||||
|
OneEvent.MetadataID = 0
|
||||||
|
ElseIf MDCodes.Contains(",") Then
|
||||||
|
Dim MDCode As String = MDCodes.Split(New Char() {","c}).GetValue(0)
|
||||||
|
Integer.TryParse(MDCode, OneEvent.MetadataID)
|
||||||
|
Else
|
||||||
|
Integer.TryParse(MDCodes, OneEvent.MetadataID)
|
||||||
|
End If
|
||||||
|
|
||||||
Dim s = ""
|
Dim s = ""
|
||||||
If Not String.IsNullOrEmpty(rs("data")) Then
|
If Not String.IsNullOrEmpty(rs("data")) Then
|
||||||
|
Loading…
Reference in New Issue
Block a user