Hi, I would like to use Delphi to get a list of all of the tables in all of the databases on our sql server.
So I start by doing an "sp_databases" query to get all of the databases. I have a separate ado connection string that I use to get the tables that doesn't have an "initial catalog" in it. I close that connection, append an "initial catalog=" + the first database name, and reopen it. Then on my tables query, which is pointing to the newly changed connection string, I am doing an "sp_tables". But, that command returns all of the tables in the Master database, not the database(s) I care about. I've checked, and my connection string definitely says "initial catalog=xxxx" where xxxx really is the first database I want to get all the tables for. And my tables query is definitely pointing to that changed connection string. Any suggestions? Thanks, Regina Regina Miller Lead Analyst, Grays Harbor County (360) 249-4144 ext 457 rmil...@co.grays-harbor.wa.us