GetOleDbType – Retrieving the OleDbType for the specified system type

GetOleDbType – Retrieving the OleDbType for the specified system type

' Return the OleDbType that represents the specified system type' This is particularly useful when you have a DataTable and want to create a ' OleDbParameter for onw of its columns, but don't know its type. ' DataColumnName.DataType returns a Type, and you can convert it to OleDbType ' by passing it to this function.' Note: requires System.Data.OleDb' Example:'   Dim param As New OleDbParameter("TestCol", GetOleDbType(String))Private Function GetOleDbType(ByVal sysType As Type) As OleDbType    If sysType Is GetType(String) Then        Return OleDbType.VarChar    ElseIf sysType Is GetType(Integer) Then        Return OleDbType.Integer    ElseIf sysType Is GetType(Boolean) Then        Return OleDbType.Boolean    ElseIf sysType Is GetType(Date) Then        Return OleDbType.Date    ElseIf sysType Is GetType(Char) Then        Return OleDbType.Char    ElseIf sysType Is GetType(Decimal) Then        Return OleDbType.Decimal    ElseIf sysType Is GetType(Double) Then        Return OleDbType.Double    ElseIf sysType Is GetType(Single) Then        Return OleDbType.Single    ElseIf sysType Is GetType(Byte()) Then        Return OleDbType.Binary    ElseIf sysType Is GetType(Guid) Then        Return OleDbType.Guid    End IfEnd Function

Share the Post:
data observability

Data Observability Explained

Data is the lifeblood of any successful business, as it is the driving force behind critical decision-making, insight generation, and strategic development. However, due to its intricate nature, ensuring the

Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved