btw, does anyone have a good / easy way to run sql scripts (*.sql) from junit so that it's easy to get the db into a known state? It's easy to do with WSAD by right clicking on it and then doing it that way, but I wanted to know if there was a better way. My hacky work around will be to just read in the whole file as a string and execute that string. Any better ideas?
Listening to: Barenaked Ladies - Lovers in a Dangerous Time
Sounds like a good workaround to me.
ReplyDeleteAnother thing you can do is if you're on the same machine as the SQL server, run the SQL file. You can use Java's Runtime.exec() method. But watch out! Runtime.exec() is NOT portable.