G
Guest
I have this code, I want a see all my informatonin in a textbox.text, how can
I do that.
Function Consultas(ByVal usuario As String) As System.Data.DataSet
Dim connectionString As String = "server='Sistemas'; user id='sa';
password=''; database='Sistemas'"
Dim dbConnection As System.Data.IDbConnection = New
System.Data.SqlClient.SqlConnection(connectionString)
Dim queryString As String = "SELECT [ImvenrtarioCompusSQL].* FROM
[ImvenrtarioCompusSQL] WHERE ([ImvenrtarioCo"& _
"mpusSQL].[Usuario] = @Usuario)"
Dim dbCommand As System.Data.IDbCommand = New
System.Data.SqlClient.SqlCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection
Dim dbParam_usuario As System.Data.IDataParameter = New
System.Data.SqlClient.SqlParameter
dbParam_usuario.ParameterName = "@Usuario"
dbParam_usuario.Value = usuario
dbParam_usuario.DbType = System.Data.DbType.String
dbCommand.Parameters.Add(dbParam_usuario)
Dim dataAdapter As System.Data.IDbDataAdapter = New
System.Data.SqlClient.SqlDataAdapter
dataAdapter.SelectCommand = dbCommand
Dim dataSet As System.Data.DataSet = New System.Data.DataSet
dataAdapter.Fill(dataSet)
Return dataSet
End Function
I do that.
Function Consultas(ByVal usuario As String) As System.Data.DataSet
Dim connectionString As String = "server='Sistemas'; user id='sa';
password=''; database='Sistemas'"
Dim dbConnection As System.Data.IDbConnection = New
System.Data.SqlClient.SqlConnection(connectionString)
Dim queryString As String = "SELECT [ImvenrtarioCompusSQL].* FROM
[ImvenrtarioCompusSQL] WHERE ([ImvenrtarioCo"& _
"mpusSQL].[Usuario] = @Usuario)"
Dim dbCommand As System.Data.IDbCommand = New
System.Data.SqlClient.SqlCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection
Dim dbParam_usuario As System.Data.IDataParameter = New
System.Data.SqlClient.SqlParameter
dbParam_usuario.ParameterName = "@Usuario"
dbParam_usuario.Value = usuario
dbParam_usuario.DbType = System.Data.DbType.String
dbCommand.Parameters.Add(dbParam_usuario)
Dim dataAdapter As System.Data.IDbDataAdapter = New
System.Data.SqlClient.SqlDataAdapter
dataAdapter.SelectCommand = dbCommand
Dim dataSet As System.Data.DataSet = New System.Data.DataSet
dataAdapter.Fill(dataSet)
Return dataSet
End Function