Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' Consultar una sentencia a la base de datos
- Public Function Consulta(ByVal Sentencia As String) As DataTable
- Using Conexion As New SqlConnection("server=" + servidor + ";database=" + catalogo + ";uid=" + usuario + ";pwd=" + clave + ";")
- Using Comando As New SqlCommand(Sentencia)
- Using Adaptador As New SqlDataAdapter()
- Comando.Connection = Conexion
- Adaptador.SelectCommand = Comando
- Using Datos As New DataTable()
- Adaptador.Fill(Datos)
- Return Datos
- End Using
- End Using
- End Using
- End Using
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement