Hello Guys,
I have a database that contains a lot of text (like a page full). I want to be able to search the database for a particular string of text or word in the database. i have a textbox on my form where the user is going to enter the input text/ string.
For example: i have this text in the database
<!-- start slipsum code -->
Now that we know who you are, I know who I am. I'm not a mistake! It all makes sense! In a comic, you know how you can tell who the arch-villain's going to be? He's the exact opposite of the hero. And most times they're friends, like you and me! I should've known way back when... You know why, David? Because of the kids. They called me Mr Glass.
Normally, both your asses would be dead as ****ing fried chicken, but you happen to pull this **** while I'm in a transitional period so I don't wanna kill you, I wanna help you. But I can't give you this case, it don't belong to me. Besides, I've already been through too much **** this morning over this case to hand it over to your dumb ass.
Now that there is the Tec-9, a crappy spray gun from South Miami. This gun is advertised as the most popular gun in American crime. Do you believe that ****? It actually says that in the little book that comes with it: the most popular gun in American crime. Like they're actually proud of that ****.
I want to be able to search for the text "hand it over" that will be entered in a the textbox on the form and display the search results in a list box in this format
it takes some text to the left and right of the search string eg. case to hand it over to your
I keep getting this error message: Expected query name after EXECUTE.
Please any suggestions on how to go about this?
Thanks
I have a database that contains a lot of text (like a page full). I want to be able to search the database for a particular string of text or word in the database. i have a textbox on my form where the user is going to enter the input text/ string.
For example: i have this text in the database
<!-- start slipsum code -->
Now that we know who you are, I know who I am. I'm not a mistake! It all makes sense! In a comic, you know how you can tell who the arch-villain's going to be? He's the exact opposite of the hero. And most times they're friends, like you and me! I should've known way back when... You know why, David? Because of the kids. They called me Mr Glass.
Normally, both your asses would be dead as ****ing fried chicken, but you happen to pull this **** while I'm in a transitional period so I don't wanna kill you, I wanna help you. But I can't give you this case, it don't belong to me. Besides, I've already been through too much **** this morning over this case to hand it over to your dumb ass.
Now that there is the Tec-9, a crappy spray gun from South Miami. This gun is advertised as the most popular gun in American crime. Do you believe that ****? It actually says that in the little book that comes with it: the most popular gun in American crime. Like they're actually proud of that ****.
I want to be able to search for the text "hand it over" that will be entered in a the textbox on the form and display the search results in a list box in this format
it takes some text to the left and right of the search string eg. case to hand it over to your
I keep getting this error message: Expected query name after EXECUTE.
Please any suggestions on how to go about this?
Thanks
VB.NET:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim feed As String
feed = TextBox2.Text
Dim con As OleDbConnection = New OleDbConnection()
con.ConnectionString = "Provider=Microsoft.Jet.Oledb.4.0; Data Source=" & Application.StartupPath & "\scrollDatabase.mdb"
Dim sqlCmd As OleDbCommand = New System.Data.OleDb.OleDbCommand()
sqlCmd.CommandType = CommandType.StoredProcedure
sqlCmd.CommandText = "SELECT * [Scroll] tablename WHERE Scroll LIKE '*" & Trim(TextBox2.Text) & "*'"
sqlCmd.Connection = con
con.Open()
Dim reader As OleDbDataReader
reader = sqlCmd.ExecuteReader()
If reader.HasRows Then
While reader.Read()
Console.WriteLine(reader("Scroll")) 'output specific column
End While
End If
Console.ReadLine()
End Sub