473,546 Members | 2,239 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

vb.net 2003 - populating with "like"

I want the user to type in part of a word, and I want to return all words
from an Access word table that contains specified letters. If they were to
type "fe??", it should return all words in the dictionary that are 4 letters
and begin with "fe" into a listbox. I am having difficulting searching for
all words and taking all those words and populating a listbox. Can you help?
Here's what I have:

CLASS -
Public Property word() As String
Get
Return m_Word
End Get
Set(ByVal Value As String)
m_Word = Value
End Set
End Property

Public Sub GetWord(ByVal Word As String)
con.Open()
cmdSelect.Param eters("@Word"). Value = Word
Dim dr As OleDb.OleDbData Reader
dr = cmdSelect.Execu teReader
While dr.Read
m_Word = dr("Word")
m_length = dr("Length")
End While

dr.Close()
con.Close()
End Sub

Private Sub Find2_Click(ByV al sender As System.Object, ByVal e As
System.EventArg s) Handles Find2.Click

Dim finished As Boolean = False, line As String

'clean out the listbox first
Display.Items.C lear()

m_foundword = New FindWord

' While Not finished
m_foundword.Get Word(WordFind.T ext)
'Do While WordFind.Text = m_foundword.wor d ' the loop didn't work so
i
''comented it
If WordFind.Text = m_foundword.wor d Then ' this will pull up one entry
' If WordFind.Text like m_foundword.wor d Then 'doesn't work

m_foundword.Get Word(WordFind.T ext)
Display.Items.A dd(m_foundword. word)

End If
'i = i + 1
'Loop
Jul 21 '05 #1
0 1335

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2672
by: Michael Flanagan | last post by:
Of course "echo" is working, but I've got a case where php doesn't seem to be sending out the result of an "echo." I'm probably doing something wrong, but I can't see it. I've got the following code on IIS 5.0, Win 2000, PHP 4.3.3, in file LH_Svc.php: <?php $resp = "<response>\r\n"; $respLen = strlen ($resp);
3
4218
by: Hodad | last post by:
I would like to adapt, as much as possible, the appearance and color red of the font in this button: <P><CENTER><BUTTON VALUE="SUBMIT"><A HREF="http://www.familytreedna.com/surname_join.asp?code=Q17978" STYLE="TEXT-DECORATION: NONE;"> <FONT COLOR="RED" FACE="COPPERPLATE GOTHIC BOLD">Right Here</FONT></A></BUTTON></CENTER></P>
15
2631
by: Marc Le Roy | last post by:
Hello, ADA Ravenscar is a restricted subset of the ADA language that has been defined for real-time software development in safety critical applications. Completed with additional restrictions like the ones defined in the SPARK profile, it allow to build very deterministic applications that support automatic static code analysis and...
2
13352
by: Dave Smithz | last post by:
Hello there, Summary: How far can you go with SQL Select queries using like clauses with wildcard characters. Can you apply anything like regular expressions? Full details: On a Intranet website, I request a code from a user which is then compared with a code in an ADO access database.
1
10943
by: Rick Brown | last post by:
I'm trying to scan a barcode that contains the text string "BPWOT08762" into a textbox for use in a DLookup or query grid. I want to look thru a table's field that contains the last 6 characters of the barcode plus a 1 character prefix. Test Data in table: SerialNumber
9
4624
by: Peter | last post by:
My problem is the last bit of coding below, the like statement does not work. what I have is a product options field and in it is stored characters i.e. "avcy" etc what the query does is that if I type in any single character all the products that match the criteria should be displayed. So if I typed in an "a" I should get 3 returns...
2
5110
by: Big John | last post by:
in Access 2003 I am trying to get sql query to run using a field as input, but I want to input into the field a value that uses the "like" operator to find any value that starts with the value placed in the field. e.g if i place the text "ada" in the field i want all values with "ada???????" when the sql is run. I can do it in a query by...
7
3860
by: Risen | last post by:
Hi,all, I want to execute SQL command " DROP DATABASE mydb" and "Restore DATABASE ....." in vb.net 2003. But it always shows error. If any body can tell me how to execute sql command as above? Thanks a lot. Best regard. Risen
0
247
by: Bill Brinkworth | last post by:
I want the user to type in part of a word, and I want to return all words from an Access word table that contains specified letters. If they were to type "fe??", it should return all words in the dictionary that are 4 letters and begin with "fe" into a listbox. I am having difficulting searching for all words and taking all those words and...
0
7504
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7435
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7792
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5360
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5080
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1921
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.