I have a program with a lot of SQL connections in it and although I know how to open, close, use, change, etc. I can't find a way to pull the DB name I am currently connected to. I have a service program with a log procedure in it that does SQL connects. What I want to do is when the "logger" is called I want to check the current SQL connection, then reset it, do my logging and change the connection back to what it was before leaving the logger. Is there a was in embedded SQL to get the DataBase name that I am connected to?