473,738 Members | 3,854 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Searching a database through an ASP website

Hello,
I haven't done much with ASP but now I'm giving it a go! However, I'd
like to ask if anybody knows if what I need to do is possible.

I have a database with a lot of tables. Each table represents a
customer. As customers come and go, so tables will be added and
removed.

I need to create a search utility that will search all tables for
(e.g.) a customer name. I'm learning ASP so I'm not that advanced, but
I'm assuming it will use some kind of SQL statment along the lines of
SELECT [criteria] FROM [tablename]. Do I need to manually add each
table name or is there a command that will automatically select all
tables?

Many thanks in advance! All advice will be of use. I'm using
dreamweavr MX and Access 2000.

Cheers,
Stu.
moonklash
Nov 13 '05 #1
8 1567
On 4 Oct 2004 03:44:46 -0700, st**********@Ex cite.com (Stuart Clark)
wrote:

There are some hidden sys* tables you could use, but the recommended
way is to use the ADOX library to enumerate the tables.

Did I mention this sounds like a really bad database design?

-Tom.

Hello,
I haven't done much with ASP but now I'm giving it a go! However, I'd
like to ask if anybody knows if what I need to do is possible.

I have a database with a lot of tables. Each table represents a
customer. As customers come and go, so tables will be added and
removed.

I need to create a search utility that will search all tables for
(e.g.) a customer name. I'm learning ASP so I'm not that advanced, but
I'm assuming it will use some kind of SQL statment along the lines of
SELECT [criteria] FROM [tablename]. Do I need to manually add each
table name or is there a command that will automatically select all
tables?

Many thanks in advance! All advice will be of use. I'm using
dreamweavr MX and Access 2000.

Cheers,
Stu.
moonklash


Nov 13 '05 #2

Hi,
Thanks for the advice! Yeah, the database design is... rather awkward!
I'll have a look and see if I can find the hidden tables. What's an ADOX
library? Don't recognise the term...

Cheers for your help, you've given me something to start working with
anyway!

Stu.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3
On 4 Oct 2004 03:44:46 -0700, st**********@Ex cite.com (Stuart Clark)
wrote:
Hello,
I haven't done much with ASP but now I'm giving it a go! However, I'd
like to ask if anybody knows if what I need to do is possible.

I have a database with a lot of tables. Each table represents a
customer. As customers come and go, so tables will be added and
removed.

I need to create a search utility that will search all tables for
(e.g.) a customer name. I'm learning ASP so I'm not that advanced, but
I'm assuming it will use some kind of SQL statment along the lines of
SELECT [criteria] FROM [tablename]. Do I need to manually add each
table name or is there a command that will automatically select all
tables?

Many thanks in advance! All advice will be of use. I'm using
dreamweavr MX and Access 2000.

Cheers,
Stu.
moonklash

Hi
This is an unusual design. It would be more nomal (pun?) to have all
the customer records in one table, with a field to identify which
customer. If you did this you could what you want in simple SQL.
David

Nov 13 '05 #4


Hiya,

Thanks for the advice! I realise it would be easier if the database
design was a bit more sensible, but unfortunetely it's being used as a
mail server and so the table structure can't be changed... :(

Thanks anyway!
Stu.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #5
st**********@Ex cite.com (Stuart Clark) wrote in message news:<c7******* *************** ****@posting.go ogle.com>...
Hello,
I haven't done much with ASP but now I'm giving it a go! However, I'd
like to ask if anybody knows if what I need to do is possible.

I have a database with a lot of tables. Each table represents a
customer. As customers come and go, so tables will be added and
removed.

Probably best not to do it that way....stick to one table for all
customers and use a record for each new customer. Information about
the things that customers get up to can then go into related tables.
Nov 13 '05 #6
You're along the right lines - "Select FieldName(s) From tableName
Where CustomerName = 'Criteria'"

But perhaps a better question would be why you have one table devoted
to each customer? A better database design would be to have a
customers table with each record devoted to a customer with proper ID
fields and linked foreign key fields. This will greatly simplify your
database and also your method of searching.

As for the way you have it now, you could make a seperate table with
all your table names in it, then when you go to search for a certain
customer, you get the table of table names in a recordset then in a
for loop use your recordset to build the sql to search for each one.

There is probably a better way in Access to do this, but I don't know
how - someone else may post it later. The best way would be above -
make a customers table (just one table) that will keep track of all
your customers.

st**********@Ex cite.com (Stuart Clark) wrote in message news:<c7******* *************** ****@posting.go ogle.com>...
Hello,
I haven't done much with ASP but now I'm giving it a go! However, I'd
like to ask if anybody knows if what I need to do is possible.

I have a database with a lot of tables. Each table represents a
customer. As customers come and go, so tables will be added and
removed.

I need to create a search utility that will search all tables for
(e.g.) a customer name. I'm learning ASP so I'm not that advanced, but
I'm assuming it will use some kind of SQL statment along the lines of
SELECT [criteria] FROM [tablename]. Do I need to manually add each
table name or is there a command that will automatically select all
tables?

Many thanks in advance! All advice will be of use. I'm using
dreamweavr MX and Access 2000.

Cheers,
Stu.
moonklash

Nov 13 '05 #7
Tom van Stiphout <no************ *@cox.net> wrote in
news:eu******** *************** *********@4ax.c om:
On 4 Oct 2004 03:44:46 -0700, st**********@Ex cite.com (Stuart Clark)
wrote:

There are some hidden sys* tables you could use, but the recommended
way is to use the ADOX library to enumerate the tables.


In what way is the use of the ADOX library superior to ADO's OpenSchema?

--
Lyle
--
use iso date format: yyyy-mm-dd
http://www.w3.org/QA/Tips/iso-date
--
The e-mail address isn't, but you could use it to find one.
Nov 13 '05 #8

Hi,

Thanks to everyone for all the advice I've received. I did ask my boss
if it would be possible to restructure the database but unfortunetely it
isn't - the mail software needs the structure to remain as it is.

This leaves me looking for a work-around. I'm going to try the advice
that everyone has been kind enough to leave but I'll probably be back
soon with more questions. If anyone has any more suggestions I'd still
be gratefull to hear them! Of course, I have actually tried toing a

SELECT abc FROM *

I assume that this wouldn't work and that I need to address each table
directly?

Alternatively, I shall see if there is any way of getting that union
query to work and try and create a query that lists everything. Or right
a very long select statement....

Cheers!
Stu.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #9

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

Similar topics

2
2531
by: John | last post by:
Hi everyone ! This is a first time I post a message here. If I post my message in a wrong group. Please ignore it. I am trying to build a website which allows users (can be thousands of users, supposedly) to upload their files to their designaged directories (max 15 files for each user). A super user (can be more than one) want to search for a particular file name and also a particular textual part of a file of all user's files in all...
1
2424
by: Robert Oschler | last post by:
I read a while back that MySQL will only use one index per query. (If this is not so, please tell me and point me to a doc that gives a good explanation of MySQL's current index usage policy). I'm using MySQL 4.2.x. Here's my dilemma. 1) --------- I have two tables that have records with a FULLTEXT index text field in each of them. The problem is the relationship between the tables is a
11
2579
by: Franz Seidl | last post by:
Hello! we (our computing school) is searching a ODBC-Driver for Windows XP. Is there any driver, which is free of charge? (you know, nearly every school (at least here in Germany) has not enough money for this "lesser" things...) Best regards, Franz Seidl
6
1712
by: Advo | last post by:
Hi Basically, i need to write a php search function which will search all our pages in the directory depending on user keywords.. the thing is, this could be difficult as we may have 8000+ dynamic pages (these would also need searching) plus we will be adding more and more of these dynamic pages (so wont have a list of page names). Any ideas please?
1
1090
by: Pradeep | last post by:
Hi All, Can anybody provide me sample/code for web site searching(i.e HTML pages, etc) without database. I am using ASP.NET 2.0. Thanks, Pradeep
3
3288
by: Aaron | last post by:
I'm trying to parse a table on a webpage to pull down some data I need. The page is based off of information entered into a form. when you submit the data from the form it displays a "Searching..." page then, refreshes and displays the table I want. I have code that grabs data from the page using cURL but when I look at the data it contains the "Searching..." page and not the table that I want. below is the code i have so far....Thanks...
0
1343
by: Nymus | last post by:
I would like to use an access database as a shared database on a remote website. I don't know if it is possible, but this is what i would like to do with this database: - Use it to run a database driven website - Maintain it via a client application and via the website. As i would like to maintain it both locally and remote via website forms written in ASP, I don't want to sync the information between the server and a client database. I...
3
1767
by: Michiel Rapati-Kekkonen | last post by:
I have a continuous form, with 22 rows on display. I make a change in some row and have the form requeried. (I have to, because the query on which the form is based is not updateable, and the change is made by code) Then I go back to the record I was working on, by code, but after that search, the record appears on top of the list of rows. This makes me a bit dizzy, and most certainly the one who's going to use it. What I would like is to...
0
8968
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9473
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9334
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
9259
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
9208
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
6750
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
6053
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4824
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2193
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.