在c#中搜索页面,可以搜索所有数据库表中的单词,而无需在数据库中进行任何更改 [英] search page in c# that can search a word in all coulm of all table of database without any change in database
问题描述
我必须使用c#,
为我的网站创建一个搜索页面,它可以搜索所有数据库表的所有列中的单词。
例如,
如果任何人搜索单词abc,
表格的名称和coulmn名称应该显示,而abc这个词的位置。我正在使用oracle数据库,我无法修改数据库。我必须做的只是通过c#编码。
请帮忙我...
i have to make a search page for my website using c#,
that can search a word in all columns of all table of database.
for example,
if any one search for a word "abc",
the name of table along with the coulmn name should display, where ever the word "abc" found . i am using oracle database, and i cannot modify database.what ever i have to do is just by c# coding.
please help me out...
推荐答案
这里搜索页面不是什么大不了的事,你可以随意设计它。
有一个带有文本框和按钮的asp.net页面,在文本框和按钮点击事件中输入搜索条件,调用一个存储过程,处理所需的查询。
这笔交易是写相应的查询。
要搜索特定的表名,我会说,< br $> b $ b
Hi,
Here the search page is not a big deal, you can design it as you want.
Have an asp.net page with a text box and a button, enter the search criteria in the textbox and on the button click event, call a stored procedure which will deal with the desired query.
The deal is to write the appropriate query.
To search fr a particular tablename i would say,
select * from sys.tables where name like '%search_criteria%'
以下是一个链接,可能会帮助你ou,结合搜索:
-row-and-columns-of-a-db [ ^ ]
希望它帮助..
问候
anurag
below is a link, which might help you, to combine a search:
http://stackoverflow.com/questions/591853/search-for-a-string-in-an-all-the-tables-rows-and-columns-of-a-db[^]
hope it helps..
regards
anurag
这篇关于在c#中搜索页面,可以搜索所有数据库表中的单词,而无需在数据库中进行任何更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!