Cycle through db tables

G

Guest

I want to be able to open a blank Access db, then connect to a SQL Server db
using:
Set cnDB = CreateObject("ADODB.Connection")
cnDB.ConnectionString = "Provider=SQLOLEDB.1; Integrated Security=SSPI;" _
& "Persist Security Info=False; Initial Catalog=ProjectServer;Data
Source=jnicapproject"
cnDB.Open

Then cycle through all the tables in the SQL Server database looking for a
specific field name. Can this be done?
 
T

Tim Ferguson

Then cycle through all the tables in the SQL Server database looking
for a specific field name. Can this be done?

Look up help for the ADOX.Catalog object.

Hope that helps


Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top