Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-01-2014, 06:27 PM
donaldadams1951 donaldadams1951 is offline What SQL server and databases are open? Windows XP What SQL server and databases are open? Office 2010 32bit
Advanced Beginner
What SQL server and databases are open?
 
Join Date: Dec 2013
Location: San Francisco Bay Area
Posts: 37
donaldadams1951 is on a distinguished road
Default What SQL server and databases are open?

Word VBA newbie...



User is running an application that uses MS SQL server. The program can either be using a test database on the back-end or a production database. While in the program they start Word. Word is the way they get data into certain parts of the program since they are using Word to create a report that will be stored in the database.

I have written a .dotm that is in the users Word StartUp folder. I query the database using macros in the macro enabled template.

The issue is that someone could open Word using either the test database or the production database on multiple servers. Since my application queries the database to get certain information I need to know whether they are using the test database or the production database and which server they are located on. I can tell by the name of the database whether they are in the test database or the production database. The test database and production databases could be on the same server or a different server.

Is there a way to use VBA and find out the name of any open SQL databases and the server they are located on? That way I could open the correct database to get the information I need.


Thank you...
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
What SQL server and databases are open? Formula to open external file with specific program (like open with) pemartins Excel 16 02-24-2014 11:39 PM
What SQL server and databases are open? Save in SERVER instead. zuzullo Outlook 3 09-08-2011 12:34 AM
unable to open .RTF files in server machine from client machine Naresh_1210 Word 0 03-12-2010 03:26 AM
Exchange Server. Do I need it? SRE Outlook 1 01-11-2010 06:36 PM
Can I use one VERY big server for everything ? RickH Project 0 12-15-2005 08:22 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:34 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft