OleDbCommand Selecting Variable Data

G

Guest

-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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top