473,833 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Global Search over Multiple Databases

Hi, I have a question. I am asked to produce a global search of a
given corporate name, in more that one database. Each database has
different table names and different field names in the tables. Does
anyone know if this can be done? Thanks

Feb 9 '06 #1
4 3567
On 9 Feb 2006 09:11:19 -0800, RoadRunner wrote:
Hi, I have a question. I am asked to produce a global search of a
given corporate name, in more that one database. Each database has
different table names and different field names in the tables. Does
anyone know if this can be done? Thanks

programmaticall y it is possible to search every relevant field of any
table, but i have no knowledge of any easy way to do that.

--
Regards
Benny Andersen
Feb 9 '06 #2
"RoadRunner " <ha*******@yaho o.com> wrote in
news:11******** **************@ g43g2000cwa.goo glegroups.com:
I have a question. I am asked to produce a global search of a
given corporate name, in more that one database. Each database
has different table names and different field names in the tables.
Does anyone know if this can be done?


Is the built-in Windows search for files containing a certain text
string not sufficient? You can limit to a particular file type, and
search subfolders. So, if you needed to find all the MDBs with that
company name in them on a particular server, you'd start at the
highest possible share level (if it's set up right, there ought to
be one top-level data share).

If that's not sufficient, you'd have to somehow get a list of all
the MDBs and then you could easily program searching all fields in
all tables in those MDBs.

Just sketching out the structure of this:

Loop 1 Start
fetches an MDB name/path from the list and opens it
Loop 2 Start
fetches the first table in the MDB from the TableDefs
collection
If NOT linked table then
Loop 3 Start
loop the fields collection of each TableDef
and construct a SQL string for each field that
tests WHERE field Like "*searchtex t*" and open a
recordset with that SQL
If match found Then
record this MDB's name and table/field name AND
exit Loop 3 OR
record MDB name and table/field name AND
go to next field
Loop 3 End
Else Next TableDef
Loop 2 End
Loop 1 End

There are many questions that would need to be answered, but that's
the basic structure of what you'd need to do:

1. get the list of MDBs (either in Access or from outside Access)

2. open each MDB in turn

3. walk the TableDefs collection

4. walk the Fields collectin of each TableDef

5. if there's a match record as much information as you need:
a. MDB name only
b. MDB name and table
c. MDB name, table and field
d. MDB name, table, field and count of matches
e. MDB name, table, field, count of matches and PKs of matching
records

That pretty much covers it so far as I can see.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Feb 10 '06 #3
I need to put the results into a access database. Also they need an
access menu front end.

Feb 14 '06 #4
"RoadRunner " <ha*******@yaho o.com> wrote in
news:11******** **************@ z14g2000cwz.goo glegroups.com:
I need to put the results into a access database. Also they need
an access menu front end.


That's nice. What's your question?

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Feb 14 '06 #5

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

Similar topics

6
7209
by: Rizyak | last post by:
******************** alt.php.sql,comp databases.ms-sqlserver microsoft.public.sqlserver.programming *********************************** Why doesn't this work: SELECT * FROM 'Events'
83
5975
by: D. Dante Lorenso | last post by:
Trying to use the 'search' in the docs section of PostgreSQL.org is extremely SLOW. Considering this is a website for a database and databases are supposed to be good for indexing content, I'd expect a much faster performance. I submitted my search over two minutes ago. I just finished this email to the list. The results have still not come back. I only searched for: SECURITY INVOKER
2
1963
by: Merrall, Graeme | last post by:
I don't think there's an easy way to do this but I thought I better ask just in case. I'm trying to come up with a way to search across a number of databases without resorting to lots of horrible scripts. In one database I have a lot of news stories from our news provider while in another database I have a lot of user entered content. Ideally I'd like to search across both databases via a single web-based search form. The obvious way is to...
8
1705
by: Sullivan WxPyQtKinter | last post by:
a relation database has admiring search efficiency when the database is very big (several thousands or tens of thousands of records). But my current project is based on XML, for its tree-like data structure has much more flexibility; and DOM, which could be manipulated just like a tree. However, how to establish such a XML data base for search when it contains 10,000 records (One record usually contain 10~30 tags) or more? My search...
35
4858
by: Terry Jolly | last post by:
Web Solution Goal: Have a global database connection Why: (There will be 30+ tables, represented by 30+ classes) I only want to reference the database connection once. I put the connection string in the web.config. I created a class with a static database connection and the class opens and closes the database.
3
2152
by: RoadRunner | last post by:
I have a form that has 6 command buttons on it. Each command button runs a different query with a wildcard parameter value that looks in 6 different tables in 6 different linked databases. None of the databases are joined or have anything in common. Right now the users have to key in the same lookup string for every button. Is there a way to have a text box on the form, where the user can key the wildcard text string and then click on...
9
14282
by: TC | last post by:
I need to design a system which represents multiple "projects" in SQL Server. Each project has the same data model, but is independent of all others. My inclination is to use one database to store all projects. Looking at the numbers involved, however, I wonder if I would get better performance by storing each project in its own database. Suppose I have 50 projects, each with two users and 10,000 rows; it seems to me I'd rather have 50 x...
3
2414
by: Henners | last post by:
Hi There We are migrating our network file system from Novell to Windows. (There are pros and cons).... In this process, we have noticed that a good bunch of user created access databases have modules or macro code that points to: \\NETWARESERVER\share\data
1
29403
weaknessforcats
by: weaknessforcats | last post by:
C++: The Case Against Global Variables Summary This article explores the negative ramifications of using global variables. The use of global variables is such a problem that C++ architects have called it polluting the global namespace. This article explores what happens when the global namespace becomes polluted and how to avoid this condition. The opinions expressed in this article are those of the author alone although many have...
0
9642
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10500
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10543
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10213
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7753
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5624
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4422
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
2
3972
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3078
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.