Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Pro Visual Basic 2005
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 3rd, 2009, 12:13 PM
Authorized User
 
Join Date: Mar 2006
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.

Thanks
 
Old December 5th, 2009, 06:44 AM
Authorized User
 
Join Date: Nov 2003
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 ?
 
Old December 7th, 2009, 10:33 AM
Authorized User
 
Join Date: Mar 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.