Check to see if a database exists in a project

3 posts / 0 new
Last post
robgentile
Offline
Joined: 08/05/2014 - 10:29
Check to see if a database exists in a project

Hi,
 
I'm writing a scriptlet to add a column to an IDEA database. I'd like to make sure the database exists before I try to add the field to it!
I don't see a way to test for the existance of the database as part of a project.
I'm new to IDEA, so this may be an obvious question, so I apologise in advance!
Thanks for your help! 
 
Rob
 
 
 
 

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Rob, what you have to do is think of the database as a normal file and check to see if the file exists.  I already have some code that does this, you can find it here.

robgentile
Offline
Joined: 08/05/2014 - 10:29

Thanks, Brian.