473,566 Members | 2,812 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can i search a keyword from a database(all the tables) using a single query

i am developing a web site in Asp.Net using Visual Studio 2008.
i want to know that how can i search a keyword that will be entered by the user, i want the key word should be searched in complete database(all the tables)using a single query.
I am using sql database.
Can some one tell me how can the keyword be searched using like parameter...
Oct 2 '10 #1
1 2180
Frinavale
9,735 Recognized Expert Moderator Expert
I think it would be best to use a Stored Procedure to do this. You would create your Stored Procedure in your database and then call it using your C# or VB.NET code to search the database. That way, when you change your database (add a table or something), all you have to do is update the stored procedure and your ASP.NET application will work as if nothing was changed.

-Frinny
Oct 4 '10 #2

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

Similar topics

3
10857
by: Paul | last post by:
Hi, I'm trying to add a modified datetime and userid to all 72 tables in my SQL 2000 database. I have the script to do one table, and a cursor, but it won't run across all tables. Any help would be appreciated. Thanks... DECLARE @tName varchar(40) DECLARE C1 CURSOR FOR select name from sysobjects where type = 'U' OPEN C1 FETCH NEXT FROM...
3
1365
by: wsnyder3 | last post by:
I am trying to create a search where the user can type in a word and if there are any matching word(s) on any table that it will display the tables matches. I am not real familiar with Access I am still learning. If anyone has any ideas of how to accomplish this it would be greatly appreciated. Thank you -D
7
2718
by: Daz | last post by:
Hi. I am trying to select data from two separate MySQL tables, where I cannot use join, but when I put the two select queries into a single query, I get an error telling me to check my syntax. Both of the queries work fine when I use them to query the MySQL server directly. My guess is that the MySQL extension only expects a single resource...
2
3565
by: barrathi | last post by:
hai all, i have 10 database in one server. i need to take a backup daily iam using this type of query ex: mysqldump -a -u root -p dbname > dbname.sql(for each db) but i need
4
3132
by: mycall | last post by:
Is there an easy way to search all tables using a string as search criteria. I have started writting a heap of nested for loops, getting table defs and fields however it is becoming a little bit of a pain. Is there some kind of select statement one might be able to write in SQL that will search all tables and all fields. I would ideally...
0
1375
by: Serman D. | last post by:
Hi, I can't understand why mysql allows me to grant lock tables to all tables in a particular database, while it fails to accept the same command applied to a single table only. I've tested on MySQL versions 4.1.20 and 5.0.33 (both running CentOS 4.4 linux on Intel-32) with exact same results. Whats wrong with grant lock tables on a...
4
8858
by: dreaken667 | last post by:
I have a MySQL database containing 16 tables of data. Each table has a different number of columns and there are few common field names accross tables. I do have one master table with which I connect the tables together with various queries using a unique id. My task is to generate reports from these tables dynamically. The user will select the...
5
3361
by: kanley | last post by:
I have a main table with a text description field. In this field, its populated with a string of data. I need to identify from this string of data the name of the vendor using some keywords. I have another table that contains 2 fields, one being the keywords to search for from the string of data and the other field being the vendor name...
4
15761
by: abdulgani | last post by:
Dear Team, i have an requirement that : i want to search all the columns of all the tables in the particular database based on the specific key word or an free text. example : table 1: columns data empname sam empid 01
0
4436
by: Hemant Pathak | last post by:
Use this query to get a whole backup of your database USE MASTER DECLARE @dbName varchar(100) DECLARE @dbPath varchar(100) DECLARE dbName_Cur CURSOR FOR SELECT Name FROM SYSDATABASES WHERE SID<>0x01 OPEN dbName_Cur FETCH NEXT FROM dbName_Cur INTO @dbName
0
7666
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...
0
7888
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. ...
0
6260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
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...
0
5213
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...
0
3643
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...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2083
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
0
925
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...

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.