473,399 Members | 2,159 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Searching with leading wildcard

I'm using a FindFirst to find a part by its part number and make it the active record. I would like to have a leading wildcard in the criteria for the search, but I have heard that it is an inefficient search method in this case. Is it better to use an SQL SELECT WHERE? How significant is the performance difference with a large database?

Thanks!

CB55
Mar 14 '08 #1
4 1444
MindBender77
234 100+
I'm using a FindFirst to find a part by its part number and make it the active record. I would like to have a leading wildcard in the criteria for the search, but I have heard that it is an inefficient search method in this case. Is it better to use an SQL SELECT WHERE? How significant is the performance difference with a large database?

Thanks!

CB55
Honestly, I think it really depends on how many records you have to search through. If you only have, say, 5000 records using a wildcard shouldn't cause that much of a problem.

Bender
Mar 14 '08 #2
missinglinq
3,532 Expert 2GB
Why would you want to have a wildcard chatracter at the beginning of the criteria if you're searching for a particular part by its part number?

Linq ;0)>
Mar 14 '08 #3
Why would you want to have a wildcard chatracter at the beginning of the criteria if you're searching for a particular part by its part number?

Linq ;0)>
Because my part numbering system was outvoted. It is now X-YY-ZZZZ, where X is part category prefix, YY is part subcategory prefix, and ZZZZ is a unique number for each part, regardless of category. So to refer to a part or find it in the database, you could use just ZZZZ. The X-YY is for information and sorting purposes only.

CB55
Mar 17 '08 #4
Scott Price
1,384 Expert 1GB
Although I don't really like them, you could use a composite (two-field) primary key in this instance, especially if you experience a huge performance hit by searching with wildcards. That would mean you split the part number into two columns: X-YY in one column and ZZZZ in the other. Then you can do a simple search either by the recordset method through code, or the WHERE criteria through a query on the one field.

btw I believe the Seek method actually is faster than the Find methods of the Recordset object.

Regards,
Scott
Mar 17 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Generic Usenet Account | last post by:
Here's the requirement that I am trying to satisfy: Handle wildcards in STL such that the wildcard entry is encountered before non-wildcard entries while traversing containers like sets and...
2
by: Mark Thomas | last post by:
Please can someone provide the code for the following problem from a video store database: where: tblVideo(VideoID, Title, Artist, etc) what would be done in frmFindTitle to select the...
1
by: deko | last post by:
I have a form where users can enter a string with asterisks to perform a wildcard search. Currently, the string entered by the user looks like this: *somestring* The purpose is to match any...
1
by: joe | last post by:
I need to replace some question marks in a number of records, but the find/replace tool uses that character as a wildcard. How can I search and replace question marks? Thanks in advance.
7
by: Mrozu | last post by:
Hi I have datagrid, with 2 columns Id and Name. I want, then i insert to datagrid, to column name "d", datagrid move to record where value of name is "d_____" , when i insert to name "da", move...
2
by: chernetsov | last post by:
I am creating a server indexing files in my local area network, in order to provide a searching feature. So i want to make it possible to searchsuch rows where the 'name' (VARCHAR) column contains...
11
by: DP | last post by:
hi, i have a films table and form. i have a txt field in teh form called txtSearch , and i;ve created a query with all the film table fields in it. how can i get the query to load up, wth the...
4
by: Costa | last post by:
I am looking for a c/c++ text search engine library that supports: - free text searching - not only beginning of words but substrings as well - wildcard searching - I want strings such as...
6
by: deve8ore | last post by:
Hello, We have a vendor that will supply us many files, and unfortunately will place them in different folders with no uniformity (within Windows Explorer). I'd like to have the capability to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.