Object compatibility between VO and VS
Posted: Fri Jan 20, 2023 2:04 pm
I’m developing a class in Visual Studio to handle SQL with PostgreSQL and NpgSql. This class I going use in VO.
The problem is in the method Select that it return a DataSet object. This object is not compatibily with VO.
Is there a method in VO that allows both data to be compatible?
Public oTabla As Npgsql.NpgsqlDataReader
Public Function PG_Select(ByVal cCadena As String) As Boolean
' Devuelve: TRUE error - FALSE sin error
Dim comando As New Npgsql.NpgsqlCommand
Try
comando.Connection = oConexion
comando.CommandType = CommandType.Text
comando.CommandText = cCadena
oTabla = comando.ExecuteReader
Return False
Catch ex As Exception
Return True 'error
End Try
End Function
Thank you
Gerard
The problem is in the method Select that it return a DataSet object. This object is not compatibily with VO.
Is there a method in VO that allows both data to be compatible?
Public oTabla As Npgsql.NpgsqlDataReader
Public Function PG_Select(ByVal cCadena As String) As Boolean
' Devuelve: TRUE error - FALSE sin error
Dim comando As New Npgsql.NpgsqlCommand
Try
comando.Connection = oConexion
comando.CommandType = CommandType.Text
comando.CommandText = cCadena
oTabla = comando.ExecuteReader
Return False
Catch ex As Exception
Return True 'error
End Try
End Function
Thank you
Gerard