473,326 Members | 2,010 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,326 software developers and data experts.

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 1553
On 4 Oct 2004 03:44:46 -0700, st**********@Excite.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**********@Excite.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**********@Excite.com (Stuart Clark) wrote in message news:<c7**************************@posting.google. 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**********@Excite.com (Stuart Clark) wrote in message news:<c7**************************@posting.google. 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.com:
On 4 Oct 2004 03:44:46 -0700, st**********@Excite.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
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...
1
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). ...
11
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...
6
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+...
1
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
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...
0
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...
3
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.