Forum Discussion
ilovechiku
Contributor
no that didnt help much :smileysad:
def dbDriver = "com.microsoft.sqlserver.jdbc.SQLServerDriver ,org.h2.Driver"
def db = Sql.newInstance(dburl, dbUserName, dbPassword, dbDriver)
could this syntax be wrong ?
rupert_anderson
9 years agoValued Contributor
Hi,
OK, well at least if you put your driver in bin/ext, then it should be in the right place.
Turning to the code, again you should use the org.h2.Driver in that first statement.
I found this SQL Server example, see if this helps:
http://stackoverflow.com/questions/1400280/connecting-groovy-to-sql-server
?
Cheers,
Rup
- rupert_anderson9 years agoValued Contributor
This one might also be useful, as it mentions a particular driver version:
https://www.ntosic.net/2015/02/groovy-connect-to-sql-server-and-execute-stored-procedure/
Related Content
Recent Discussions
- 15 years ago