nicks60610
MIS
This may fall more in to an Oracle posting than ASP.net, but I figured I would ask here first .
I am trying to create a text box where a user will enter a value, but sometimes this value may be the middle of the actual value in the DB, so I want to set it up so that no matter what they enter, it will search for that key word in all of the DB.
This is the code I have now:
Sub BindData()
NM1.Visible = True
Dim conTab As New OleDbConnection()
conTab = New OleDbConnection("Provider=MSDAORA.1;Password=sdsdsd;User ID=fgfgfgfg;Data Source=DSSOURCE;Persist Security Info=True;")
conTab.Open()
Dim cmdSelect As OleDbCommand
Dim strTitle
strTitle = Title.Text
cmdSelect = New OleDbCommand("Select DOC_NUMBER, DOC_TITLE, REV, STATUS FROM DOC_CO_RECORDS WHERE DOC_TITLE LIKE '" & strTitle & "'", conTab)
Dim DataReader As OleDbDataReader
NM1.DataSource = cmdSelect.ExecuteReader
NM1.DataBind()
conTab.Close()
End Sub
I tried posting the variable like this:
'" % & strTitle & % "' but it did not like that...
Thanks for any input.
I am trying to create a text box where a user will enter a value, but sometimes this value may be the middle of the actual value in the DB, so I want to set it up so that no matter what they enter, it will search for that key word in all of the DB.
This is the code I have now:
Sub BindData()
NM1.Visible = True
Dim conTab As New OleDbConnection()
conTab = New OleDbConnection("Provider=MSDAORA.1;Password=sdsdsd;User ID=fgfgfgfg;Data Source=DSSOURCE;Persist Security Info=True;")
conTab.Open()
Dim cmdSelect As OleDbCommand
Dim strTitle
strTitle = Title.Text
cmdSelect = New OleDbCommand("Select DOC_NUMBER, DOC_TITLE, REV, STATUS FROM DOC_CO_RECORDS WHERE DOC_TITLE LIKE '" & strTitle & "'", conTab)
Dim DataReader As OleDbDataReader
NM1.DataSource = cmdSelect.ExecuteReader
NM1.DataBind()
conTab.Close()
End Sub
I tried posting the variable like this:
'" % & strTitle & % "' but it did not like that...
Thanks for any input.