- 2026-05-29 1.1.18 Corrección rutina LeeMysql y LeeMysqlBytArray para que como maximo se admitan 2048 caracteres string
This commit is contained in:
17
bbdd.vb
17
bbdd.vb
@@ -4,6 +4,7 @@ Imports System.Data.Common
|
|||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
Imports System.Globalization
|
Imports System.Globalization
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports tsUtilidades.Extensiones
|
||||||
Public Class bbdd
|
Public Class bbdd
|
||||||
Public Shared Function EjeMySqlHex(BD As DbConnection, sqlh As String) As String
|
Public Shared Function EjeMySqlHex(BD As DbConnection, sqlh As String) As String
|
||||||
Try
|
Try
|
||||||
@@ -85,7 +86,7 @@ Public Class bbdd
|
|||||||
Tipo = "N"
|
Tipo = "N"
|
||||||
Tamaño = 20
|
Tamaño = 20
|
||||||
End Select
|
End Select
|
||||||
If Tamaño <= 1024 Then
|
If Tamaño <= 2048 Then
|
||||||
sLinea &= dc.ColumnName & "(" & Tipo & iInicioBuffer.ToString & ";" & Tamaño.ToString & ")|"
|
sLinea &= dc.ColumnName & "(" & Tipo & iInicioBuffer.ToString & ";" & Tamaño.ToString & ")|"
|
||||||
iInicioBuffer += Tamaño
|
iInicioBuffer += Tamaño
|
||||||
End If
|
End If
|
||||||
@@ -96,10 +97,11 @@ Public Class bbdd
|
|||||||
For Each dc In dt.Columns
|
For Each dc In dt.Columns
|
||||||
Select Case dc.DataType
|
Select Case dc.DataType
|
||||||
Case GetType(String)
|
Case GetType(String)
|
||||||
|
Dim tam = System.Math.Min(2048, dc.MaxLength)
|
||||||
If Not dr(dc) Is DBNull.Value Then
|
If Not dr(dc) Is DBNull.Value Then
|
||||||
sLinea &= dr(dc).ToString.PadRight(dc.MaxLength, " ")
|
sLinea &= dr(dc).ToString.Acortar(tam).PadRight(tam, " ")
|
||||||
Else
|
Else
|
||||||
sLinea &= "".PadRight(System.Math.Min(2048, dc.MaxLength), " ")
|
sLinea &= "".PadRight(tam, " ")
|
||||||
End If
|
End If
|
||||||
Case GetType(DateTime), GetType(Date)
|
Case GetType(DateTime), GetType(Date)
|
||||||
Dim sFecha As String = "null"
|
Dim sFecha As String = "null"
|
||||||
@@ -151,7 +153,7 @@ Public Class bbdd
|
|||||||
Select Case dc.DataType
|
Select Case dc.DataType
|
||||||
Case GetType(String)
|
Case GetType(String)
|
||||||
Tipo = "X"
|
Tipo = "X"
|
||||||
Tamaño = dc.MaxLength
|
Tamaño = System.Math.Min(2048, dc.MaxLength)
|
||||||
Case GetType(DateTime), GetType(Date)
|
Case GetType(DateTime), GetType(Date)
|
||||||
Tipo = "F"
|
Tipo = "F"
|
||||||
Tamaño = 20
|
Tamaño = 20
|
||||||
@@ -159,7 +161,7 @@ Public Class bbdd
|
|||||||
Tipo = "N"
|
Tipo = "N"
|
||||||
Tamaño = 20
|
Tamaño = 20
|
||||||
End Select
|
End Select
|
||||||
If Tamaño <= 1024 Then
|
If Tamaño <= 2048 Then
|
||||||
sLinea &= dc.ColumnName & "(" & Tipo & iInicioBuffer.ToString & ";" & Tamaño.ToString & ")|"
|
sLinea &= dc.ColumnName & "(" & Tipo & iInicioBuffer.ToString & ";" & Tamaño.ToString & ")|"
|
||||||
iInicioBuffer += Tamaño
|
iInicioBuffer += Tamaño
|
||||||
End If
|
End If
|
||||||
@@ -170,10 +172,11 @@ Public Class bbdd
|
|||||||
For Each dc In dt.Columns
|
For Each dc In dt.Columns
|
||||||
Select Case dc.DataType
|
Select Case dc.DataType
|
||||||
Case GetType(String)
|
Case GetType(String)
|
||||||
|
Dim tam = System.Math.Min(2048, dc.MaxLength)
|
||||||
If Not dr(dc) Is DBNull.Value Then
|
If Not dr(dc) Is DBNull.Value Then
|
||||||
sLinea &= dr(dc).ToString.PadRight(dc.MaxLength, " ")
|
sLinea &= dr(dc).ToString.Acortar(tam).PadRight(tam, " ")
|
||||||
Else
|
Else
|
||||||
sLinea &= "".PadRight(dc.MaxLength, " ")
|
sLinea &= "".PadRight(tam, " ")
|
||||||
End If
|
End If
|
||||||
Case GetType(DateTime), GetType(Date)
|
Case GetType(DateTime), GetType(Date)
|
||||||
Dim sFecha As String = "null"
|
Dim sFecha As String = "null"
|
||||||
|
|||||||
@@ -16,11 +16,12 @@
|
|||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<PackageId>tsUtilidades</PackageId>
|
<PackageId>tsUtilidades</PackageId>
|
||||||
<PackageTags>net8.0, libreria</PackageTags>
|
<PackageTags>net8.0, libreria</PackageTags>
|
||||||
<Version>1.1.17</Version>
|
<Version>1.1.18</Version>
|
||||||
<Authors>Manuel</Authors>
|
<Authors>Manuel</Authors>
|
||||||
<Company>Tecnosis S.A</Company>
|
<Company>Tecnosis S.A</Company>
|
||||||
<Description>Utilidades Varias</Description>
|
<Description>Utilidades Varias</Description>
|
||||||
<PackageReleaseNotes>
|
<PackageReleaseNotes>
|
||||||
|
- 2026-05-29 1.1.18 Corrección rutina LeeMysql y LeeMysqlBytArray para que como maximo se admitan 2048 caracteres string
|
||||||
- 2026-05-29 1.1.17 Corrección rutina LeeMysql para que como maximo se admitan 2048 caracteres string
|
- 2026-05-29 1.1.17 Corrección rutina LeeMysql para que como maximo se admitan 2048 caracteres string
|
||||||
- 2026-05-19 1.1.16 Corrección multiplataforma tsNotificacionesClient
|
- 2026-05-19 1.1.16 Corrección multiplataforma tsNotificacionesClient
|
||||||
- 2026-05-12 1.1.15 Se corrige tsNotificacionesClient
|
- 2026-05-12 1.1.15 Se corrige tsNotificacionesClient
|
||||||
|
|||||||
Reference in New Issue
Block a user