Results 1 to 2 of 2

Thread: convert textbox to string

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2005
    Location
    Philippines
    Posts
    32

    convert textbox to string

    how can i convert textbox to string and to make it upper case?? here is my code.. please help..

    VB Code:
    1. Dim TextBox1 As String
    2.         Dim a As New DataSet
    3.         Dim b As New OleDb.OleDbDataAdapter
    4.         Dim c As New OleDb.OleDbConnection
    5.         c.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\phil\wa.mdb;Persist Security Info=true"
    6.         c.Open()
    7.         b.SelectCommand = New OleDb.OleDbCommand("SELECT * FROM Table1 WHERE Fname=" & TextBox1 & ";", c)
    8.         TextBox1.ToUpper()
    9.         b.Fill(a, "Hello")
    10.         DataGrid1.DataSource = a.Tables(0)
    11.         DataGrid1.DataBind()
    12.         c.Close()

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091

    Re: convert textbox to string

    Code:
    b.SelectCommand = New OleDb.OleDbCommand("SELECT * FROM Table1 WHERE Fname=" & TextBox1.Text.ToUpper & ";", c)
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width