Select
Publicado por Ismael (10 intervenciones) el 11/02/2005 21:59:08
Hola amigos foreros, komo soy novato en esto tengo una duda, tengo esta konexion a mi bd en sql:
Public Function Recuperar() As DataSet
Dim conexion As SqlConnection = New SqlConnection("Initial catalog=AdmonProy; Integrated Security=SSPI; Data Source=LocalHost")
Dim sentencia As SqlCommand = conexion.CreateCommand()
Dim ControlErrores As String
sentencia.CommandText = "SELECT * FROM table1"
Try
conexion.Open()
Catch ex As Exception
ControlErrores = ex.Source & " " & ex.TargetSite.ToString & " " & ex.GetBaseException.ToString()
MessageBox.Show(ex.ToString())
End Try
End Function
Lo uniko ke kiero hacer eske por medio de algo ke se pongo en un textbox haga un filtro y me traiga algo d ela bd, pero no se komo se hace en .net ojala y me puedan ayudar , gracias...
Public Function Recuperar() As DataSet
Dim conexion As SqlConnection = New SqlConnection("Initial catalog=AdmonProy; Integrated Security=SSPI; Data Source=LocalHost")
Dim sentencia As SqlCommand = conexion.CreateCommand()
Dim ControlErrores As String
sentencia.CommandText = "SELECT * FROM table1"
Try
conexion.Open()
Catch ex As Exception
ControlErrores = ex.Source & " " & ex.TargetSite.ToString & " " & ex.GetBaseException.ToString()
MessageBox.Show(ex.ToString())
End Try
End Function
Lo uniko ke kiero hacer eske por medio de algo ke se pongo en un textbox haga un filtro y me traiga algo d ela bd, pero no se komo se hace en .net ojala y me puedan ayudar , gracias...
Valora esta pregunta


0