OleDbCommand Selecting Variable Data

Discussion in 'ASP .Net' started by =?Utf-8?B?SmFzb24gU3RlZXZlcw==?=, Jun 27, 2005.

  1. -Dim cmd As OleDbCommand
    -cmd = New OleDbCommand("select * from qmsstats where firstname='jason'",
    OleDbConnection1)
    -OleDbDataAdapter2.SelectCommand = cmd
    -DataGrid1.Visible = True
    -OleDbDataAdapter2.Fill(DsQmsStats1)
    -DataGrid1.DataBind()

    In the above example I need to change 'jason' to a variable. I need the
    variable to be pulled from a textbox. IE: txtusername.text. Please advise how
    I can get the value from txtusername.text in place of 'jason'.

    Thanks, Jason Steeves
    =?Utf-8?B?SmFzb24gU3RlZXZlcw==?=, Jun 27, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. darrel

    OleDbDataAdapter vs OleDbCommand

    darrel, Nov 23, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    6,912
    Scott M.
    Nov 25, 2005
  2. Tom Wild
    Replies:
    0
    Views:
    381
    Tom Wild
    Aug 21, 2003
  3. Simon Harris
    Replies:
    1
    Views:
    339
    DalePres
    Jan 31, 2005
  4. Mark Sandfox

    Problem with OleDBCommand Update

    Mark Sandfox, Jul 29, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,998
    Balder78
    Aug 13, 2008
  5. Jason Steeves

    OleDbCommand Selecting Variable Data

    Jason Steeves, Jun 27, 2005, in forum: ASP General
    Replies:
    1
    Views:
    128
    Bob Barrows [MVP]
    Jun 27, 2005
Loading...

Share This Page