Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Pro Visual Basic 2005
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Pro Visual Basic 2005 For advanced Visual Basic coders working in version 2005. Beginning-level questions will be redirected to other forums, including Beginning VB 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro Visual Basic 2005 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 3rd, 2009, 12:13 PM
Authorized User
Join Date: Mar 2006
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Search Databases to find text

I'm looking for a way to connect to a database server with a user supplied username/password and then searching through all the databases for a particular text string.

I know I can connect to each database individually and type sp_findtext '%<word>%' but it would be much easier to do this programmatically.

I came across some code to do this a few years ago, but can't seem to find it now.

There's actually 3 steps to this:

1. Connecting to a database server with a user name and password
2. Getting a list of all the databases connected to the server
3. Connecting to each individual database and searching for particular text.

I primarily need an example for step 3.

  #2 (permalink)  
Old December 5th, 2009, 06:44 AM
Authorized User
Points: 236, Level: 4
Points: 236, Level: 4 Points: 236, Level: 4 Points: 236, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Nov 2003
Location: Bucharest, , Romania.
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts

Do you know the structure of the database ? I mean, if you knew the tables and columns, you could write a usual query for the text columns in every database/table you're interested in.

Or is this to simple an answer ?
  #3 (permalink)  
Old December 7th, 2009, 10:33 AM
Authorized User
Join Date: Mar 2006
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts

I was more looking for what was in the stored procedures. I wanted a way for it to easily connect to one database, do the search and return the results, then hit the next database and repeat the process for all databases.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Find or Search Operation bright_mulenga Access VBA 2 January 17th, 2008 11:55 AM
New text search doesn't preselect search string planoie Visual Studio 2005 0 July 23rd, 2007 06:47 AM
how to find text within range of two tags dipsut XSLT 3 May 25th, 2007 04:27 PM
Search a text Mihai B Excel VBA 2 January 25th, 2005 10:07 AM
Search Engine for Full-text Search Kala ASP.NET 1.0 and 1.1 Professional 2 August 29th, 2004 02:16 AM

All times are GMT -4. The time now is 01:09 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.