473,394 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

select textbox.text

I have this code, I need see in textbox.text all my information, how 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(connectionStri ng)

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

Nov 19 '05 #1
3 2225
So access dataSet.Tables[0] and iterate over the Rows property and get the
data you need/want. Once you have that data, you can put it into a TextBox.
I'm not sure exactly what you want, but here's a sample that might help:

foreach (DataRow row in dataSet.Tables[0])
{
string val = (string)row["MyStringColumn"];
MyTextBox.Text += val + Environment.NewLine; // append this in my multiline
TextBox
}

-Brock
DevelopMentor
http://staff.develop.com/ballen
I have this code, I need see in textbox.text all my information, how 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(connectionStri ng)
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


Nov 19 '05 #2
I nedd to put in textbox1.text=usuario. textbox2.text=ip etc. using the code
below, thank for you answer.

"Brock Allen" wrote:
So access dataSet.Tables[0] and iterate over the Rows property and get the
data you need/want. Once you have that data, you can put it into a TextBox.
I'm not sure exactly what you want, but here's a sample that might help:

foreach (DataRow row in dataSet.Tables[0])
{
string val = (string)row["MyStringColumn"];
MyTextBox.Text += val + Environment.NewLine; // append this in my multiline
TextBox
}

-Brock
DevelopMentor
http://staff.develop.com/ballen
I have this code, I need see in textbox.text all my information, how 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(connectionStri ng)
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


Nov 19 '05 #3
I ned to put textbox1.text=usuario, textbox2,text=ip, etc. thank for you
answer.

"Brock Allen" wrote:
So access dataSet.Tables[0] and iterate over the Rows property and get the
data you need/want. Once you have that data, you can put it into a TextBox.
I'm not sure exactly what you want, but here's a sample that might help:

foreach (DataRow row in dataSet.Tables[0])
{
string val = (string)row["MyStringColumn"];
MyTextBox.Text += val + Environment.NewLine; // append this in my multiline
TextBox
}

-Brock
DevelopMentor
http://staff.develop.com/ballen
I have this code, I need see in textbox.text all my information, how 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(connectionStri ng)
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


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Phill | last post by:
I thought when you tabbed into a textbox that the text it contained was automatically highlighted. This use to be the default in win32. Is there an easy way to do this in .NET. I don't want this...
1
by: Mad Scientist Jr | last post by:
I'm stuck trying to work with a HTML <SELECT> control and javascript (similar to DualList but that control doesn't offer enough options to totally control the text on the buttons and control, also...
2
by: Cindy M -WordMVP- | last post by:
Hi all While working my way through a VB.NET exercise, I came across something that didn't do what the text said it should and I'm wondering if it's supposed to behave this way, or not (and...
4
by: Brett | last post by:
I have a textbox with a heigth of 384. I put a lot of text into it and must scroll down to see it all. When I do Ctrl + A, it doesn't highlight all of the text. I have to manually drag my mouse...
3
by: abc my vclass | last post by:
My win-form have many numericupdown controls to applied. But numericupdown control don't like textbox, text box control can automatic selected text when got focus. Is there any method can let me...
8
by: cj | last post by:
I asked this question a couple of days ago but am just now looking at it again. I used to use the textbox gotfoucs event to have all the text in the textbox selected when it gotfocus. That...
4
by: Dabbler | last post by:
Is there a way to mark the text in a TextBox control as selected so when the user types a new value the existing text is replaced? Thanks
12
by: Brano | last post by:
Hi I am using vb.net 2005 this is a windows application I am using this functionality in another project I have created this simple project to show the problem Basically I have two forms: ...
13
by: PinkBishop | last post by:
I am using VS 2005 with a formview control trying to insert a record to my access db. The data is submitted to the main table no problem, but I need to carry the catID to the bridge table...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.