Searching All Database Tables
How can ASP be used to search through a database that has multiple tables in it? I want to be able to enter a string into a field in an ASP page and the resultant tables to be listed in a table or list on an asp page. It might be the same page or another. I know it can be done - but I can't link the concepts or code together.
View Replies
ADVERTISEMENT
I have a search option on my website, which should perform a search on 4 fields, as follows:
tblNews
headline
content
tblDatabank
filename
description
It only needs to return matches which are an exact match of their search criteria. For instance, searching for "I am here" would return a record which contained "I am here", but not just "I" or "I am" etc.
I need to return all these records as part of one recordset preferably, as I want to be able to order them etc., though I imagine you may suggest I use an array somehow to merge two recordets etc., then reorder them?
View Replies
View Related
I need help in retreiving data from database. my form consists of some checkboxes,
for eg:- in my form for location three check boxes are there and for the type of house four checkboxes.(houses,apartments,offices etc).Below is my form,
London (north of river)
(checkbox here)Central London
(checkbox here) Docklands
(checkbox here)Ealing, Chiswick & Acton
Number of Bedrooms(text box here)
(checkbox here)Houses
(checkbox here)Apartments
(checkbox here)Developments & Land
(checkbox here)Commercial
My databse consists of all this information. If the user want 2 bedroom flat or apartment in central london he will check central london, 2 bedrooms, house and apartment. for this i need an sql query to retrieve from database the appropriate property they are finding.
View Replies
View Related
I have a code that compares the value in the textfeild of a form with the value in the database table
do until rsData.EOF
if trim(rsData("core_contact_fname"))=trim(request.form("txtNumber1")) then%>
i would like to do two things to it one is to compare the two values while ignoring their cases(ignore case) i am not sure how to use the ignore case function.
I also want it to comapre if i want to search for say"L" I should get all the names starting with L from the database.
View Replies
View Related
I have a website running asp (about to move to asp.net soon though) which has a list of DVD's I have the various pages I want, last 10, listing, full listing ect, but the one page i can't figure out is a search page. I have read various books, but none have given any tips on how to make a search page for a access DB.
View Replies
View Related
I did a quick search on this (insert ironic comment) but cannot find anything appropriate. What I have is a site running out of an access database, holding roughly 150+ pages in the same format, i.e. a page header, content text, and the date it was published.
What I want to do is to have a search form where a user can insert keywords, and the search script then queries the database and pulls out links to the pages (or database entries, obviously) that match the query. I've tried another script but this only searches for .htm or .html files within the directory my site is housed in. Is there a tutorial/direction anyone can point me to in order to achieve this?
View Replies
View Related
I have the following code and nee to know how to make it return all records where sha is equal to any of the values in the array I have defined. Code:
View Replies
View Related
I get the following error:
Command text was not set for the command object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Command text was not set for the command object. Code:
View Replies
View Related
I want to search my database using a person's name. My names are separated into 'First' and 'Last' name fields.
The SQL I'm using so far works if you search only by the first name, or only by the surname, but if you enter both names, it comes back with no results.
How do you do it so that it will work in all cases?
Here's my code:
Sql = "SELECT * FROM kbs, authors WHERE authors.authorID = kbs.author"
If Request.Form("TypeSearch") = "author" Then
Sql = Sql & " AND (authors.authorLastName LIKE '%" & Request.Form("kbsSearch") & "%' OR authors.authorFirstName LIKE '%" & Request.Form("kbsSearch") & "%')"
End If
set rs = Server.CreateObject("ADODB.Recordset")
set rs=conn.execute(Sql)
View Replies
View Related
Basically i have one table and i want to search it by what the user types in the search bar/text box.
View Replies
View Related
I want to search 2 of my database fields (title and description) for search terms entered in a form. I can do a 'LIKE' but how do I cover searching for each word in the string that has been submitted? For example, if someone searches for 'World Cup Final', I want to search both database fields for 'world', 'cup' and 'final'.
View Replies
View Related
I'd like to give the visitor the option of searching my database entries, for: 'all words', 'the phrase', 'any word' etc. Code:
View Replies
View Related
The user can search the database when they put in a date, that works fine, but when i put in another text box to search the database for a certain date range Code:
View Replies
View Related
I want to create a database and its tables and populate it through a web page, using ASP. The database is MySQL on win32 (4.10.13-nt) and the driver is MyOLEDB 3.0.
One thing, to set up the ole-db connection, it seems I have to specify a data source, which is an already existing database.
The Connection works and I actually can create the database, but the code for the table creation generates a 500 server error. The SQL itself is taken straight out of MySQLcc query window, so I know it's all good, syntactically.
(Also, regarding the connection, I can connect to and read from an existing database. It's the table creation that seems to be the trouble.)
I did a response.write to the page to make sure that the code coming out is what went in and that is the case. So, I guess one question is, what could be different about creating tables in a db that would fail, when "create database test_links;" and "use test_links;" both complete successfully (and the newly-created database shows up, just no tables in it).
To test the sql, i made three strings of SQL and executed each of them sequentially. The first two work, the third (table generation) fails.
A second question is, is there a way to capture any error message that might be generated at the MySQL end, rather than having the page bomb out; and then display the error. I tried using a RecordSet object, that didn't work, the page still crashes.
View Replies
View Related
I have an access database called employment.mdb The fields that I have in this database are:
Company, Location, Dates, Position, Signing, and Duties.
The problem I am having, I can go in and create a Drop Down pulling information from the Company field, but I can not get the information from the rest of the fields to
populate. I want the Database column values to change when I select a different company.
I will be honest, my only experience with it has been thru Frontpage, I can go in and create a drop down, but get errors if I try to add other database connections into that query. I have enough experience at working with html, but not the asp side of it. I would really appreciate some help with this.
View Replies
View Related
I've made a website for a little athletics club in HTML. I want to transform the records page into an ASP page that has an admin page so i can go to the admin page and easily add in the records without having to create all the tables and doing it all the manual way.
I know how to create the admin page and the database, but in my case, i want to be able to create a new table in the database for each week of records (as seen in the link below), and each of these tables will have the same fields (age, gender, event, athlete name etc.) I know how to make it so that asp can add, edit and delete a field in a table, but how would i get it to add a new table for each week of records?
View Replies
View Related
I have Database with 2x tables one with Client data and 2nd with invoice data.
When a new invoice is submited in the invoice data I enter only the client ID not all the client data.
Ok the problem is that when I want to print out the last or any invoice data I have only the Client ID
not the all client data.
View Replies
View Related
I wanted to ask your opinion about *joining two tables* from *two different database* together. Is *that* possible My project requires me to join identical tables from different database; *eg. MyTable* from *Friends.mdb* and *Foes.mdb* respectively. Is that achievable? I do hope anyone here can enlighten me on this one because I am really a newbie in using Access DB and also I'm using *ASP* in this project.
View Replies
View Related
I want to do a searching on database some tables' content, is asp have so function or tool to do this?
View Replies
View Related
I was just wondering if there is anyway to link tables from another Access database using ASP. Just like the function in Access where we can go File->Get External Data->Link Tables.
I have implemented some e-modules and they all have individual database as a backend. But, my boss would like to allow all these e-modules to share data. Therefore I am thinking of linking all the tables in those databases through a 'gateway' database (gateway.mdb). This 'gateway' database would have link tables from all other databases.
View Replies
View Related
i need to display all my tables from the mySQL database in a table on an ASP/Javascript page, each as a link, so that when clicked, it wil open the selected table for editing. unable to do it as dreamweaver MX is not accepting 'show tables' as a valid query. how can i go about doing this? i'm relatively new to ASP, working on it for only 2 months now.
View Replies
View Related
What I want to do I select one database and the set the Rs1, rs2 etc.. like in Vb6 I would set DB then:
Set rs1 = db1.OpenRecordSet("Table1")
Set rs2 = db1.OpenRecordSet("Table2")
etc...
However how do I do this in asp3? Code:
View Replies
View Related
I know how to create dynamic tables in dreamweaver to display fields and records in a table of a database, but in my case I need to create a dynamic table that lists all the tables in the database, then to click on the one i want 2 edit the data in there.
View Replies
View Related
I have some variables that consist of small paragraphs and or short sentences. How can I to see if a specific word is used in the text of that var.
View Replies
View Related
i want to perform search operations using ASP.
this is a word search i.e. every word entered as search keyword
should be searched in the database...
since it is a word search, i tried to split the string entered as search keyword,
and then search for each splitted word in the database.
It worked for only a few records present in the database. some 1034 records were searched out of 1914 i tried the same procedure in PHP and that worked.
View Replies
View Related
I'm having some problems using like to find items in my database for some reason its not finding anything if it has a space in it. Here is my SQL query:
SELECT * FROM Employees WHERE FirstName LIKE '%Dennis Smith%' OR LastName LIKE '%Dennis Smith%'
In this query i'm searching two fields for any occurance of Dennis Smith whom i know is in the database however no results are returned. Also if i just search one field and the search string has a space in it, no results are returned.
View Replies
View Related
currenlty we are changing our user email ids- about 2000.I have an excel file with thier new and old email ids.
Is it possible to make a .asp form file and put in an IIS server.
where user enter their current id- and the asp returns the new email id.
View Replies
View Related
I'm trying to design a simple website with 2 dynamic searching functions. The first is the user enters text into a search box, clicks on the search button and then connects to a sql or access database and brings back those records that are LIKE the search phrase. It's my intention to then have a detailsview link on the searches so the user can drill through.I'm designing an online version of my catalog so that the user can browse by page. I also want the user to enter a page number and then click go and that would then take the user to the corresponding page in the catalog. I'm guessing I'll need to declare If 1 then open page1.html, if 2 then open page2.html.
I know I'm close but not close enough and my knowledge has been well and truly stretched and I must have read and read my Dummies book about 20 times over the last week.
View Replies
View Related
I have a single column that outputs a comma seperated list of values (black, white, red)
I created an arrary to output the values
Dim colorTypes, arrTypes
arrTypes = split(objRS("types"), " ")
riceTypes = REPLACE(objRS("Types"), ", ", "<Li>")
response.Write "<Li>" & colorTypes
This works fine. Now, I need to compare a queryString to arrTypes and bold the match before outputting it.
View Replies
View Related
Just wondering the best way of doing this? are there any dictionary databases laying around somewhere?
I want to change my search so that it corrects typo's and maybe suggests better words to search with... like googles but with more alternative words to make the search more useful - slightly limited so it doesn't become pages and pages of search terms.
What I don't want to do is sit down in front of my computer and type all of this in, going through related words and possible other searches / best searches from the given input.
View Replies
View Related
A client uploads a document (a msword .doc file) to the server,
I need to search a string that document and find specific words in it
(this is an Application to a School, most of them look the same, so all you can do is replace the school name in the application, but sometimes people forget to do so and get rejected for sending inappropriate application).
So I need to find in each Application possible names of other schools and alert about it.
I'm writing in ASP (I can use ASP.net as well)
I DON'T HAVE ACCESS TO THE SERVER (it belongs to the hosting company, and there's no way of installing anything there)
View Replies
View Related
I have a simple intranet for the company I work for and I am attempting to create a phone listing and search tool for it. The list has a simple 500 record access db.
Presently I have a page which displays the entire db. What I'd like to do is have a form at the top of the page that lists the entire db where a person could type in any word... Name, office location etc and have the result ported out on a new page with only items matching the search criteria. Code:
View Replies
View Related
I have a database which has a field called "title". I have made a text input box and set that user submitted text to a variable (call it textvar). How do I say something like this...?
Set rs = conn.execute("Select * from workitem where title contains '" &textvar& "' " )
Of course the word contains is just a guess on my part.. other ideas are "is like". What function/syntax will give me what I want, which is for it to return any title that has the words entered by the user?
View Replies
View Related