| От | Steve Wampler |
|---|---|
| Тема | Detecting presence of database through JDBC? |
| Дата | |
| Msg-id | 39219136.FC6A1C87@noao.edu обсуждение исходный текст |
| Ответы |
Re: Detecting presence of database through JDBC?
|
| Список | pgsql-interfaces |
Is there a way to determine whether or not a particular database exists programmatically throught JDBC? I was expecting an exception to be thrown if the DriverManager.getConnection(url, user, pwd) method cannot complete, but instead I get a "FATAL" error that doesn't seem to be catchable. (I'd like the program to automatically create a database if it doesn't yet exist and then populate it with the tables that are needed. Handling the tables is easy, but I haven't found a way around the test for the database yet...) Thanks for any help! Steve -- Steve Wampler- SOLIS Project, National Solar Observatory swampler@noao.edu
В списке pgsql-interfaces по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера