# What's my mssql JDBC driver classname?

**URL:** <https://forum.inductiveautomation.com/t/whats-my-mssql-jdbc-driver-classname/19180>\
**Category:** Ignition\
**Created:** [August 9, 2018, 4:12pm UTC](https://forum.inductiveautomation.com/t/whats-my-mssql-jdbc-driver-classname/19180 "2018-08-09T16:12:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![brian.kehn](https://avatars.discourse-cdn.com/v4/letter/b/bbe5ce/32.png) [@brian.kehn](https://forum.inductiveautomation.com/u/brian.kehn)\
**Post date:** [August 9, 2018, 4:12pm UTC](https://forum.inductiveautomation.com/t/whats-my-mssql-jdbc-driver-classname/19180/1 "2018-08-09T16:12:17Z")

</div>

Does anyone know how to find the classname for the JDBC MS Sql Server driver? When I run this code I get a driver not found error.

```auto
def testSPCall():
	from com.ziclix.python.sql import zxJDBC, Procedure
	
#	#create database connection
	db = zxJDBC.connect("jdbc:sqlserver://10.15.4.246\SQLEXPRESS", "sa", "NTH", "com.microsoft.sqlserver.jdbc.SQLServerD‌​river")

```

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/2/2be88bfabaccf351a5b4d4fe8674b0b623d8962c.PNG)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 9, 2018, 4:32pm UTC](https://forum.inductiveautomation.com/t/whats-my-mssql-jdbc-driver-classname/19180/2 "2018-08-09T16:32:48Z")

</div>

Where are you trying to run this code?

---

<div class="post-metadata">

**Author:** ![brian.kehn](https://avatars.discourse-cdn.com/v4/letter/b/bbe5ce/32.png) [@brian.kehn](https://forum.inductiveautomation.com/u/brian.kehn)\
**Post date:** [August 9, 2018, 4:37pm UTC](https://forum.inductiveautomation.com/t/whats-my-mssql-jdbc-driver-classname/19180/3 "2018-08-09T16:37:16Z")

</div>

In the Project Script Library

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 9, 2018, 4:39pm UTC](https://forum.inductiveautomation.com/t/whats-my-mssql-jdbc-driver-classname/19180/4 "2018-08-09T16:39:12Z")

</div>

Sure, but from what context are you calling the script? Client/Designer (a button, etc…)?

JDBC drivers are only going to be on the classpath in the gateway scope.

---

<div class="post-metadata">

**Author:** ![brian.kehn](https://avatars.discourse-cdn.com/v4/letter/b/bbe5ce/32.png) [@brian.kehn](https://forum.inductiveautomation.com/u/brian.kehn)\
**Post date:** [August 9, 2018, 4:42pm UTC](https://forum.inductiveautomation.com/t/whats-my-mssql-jdbc-driver-classname/19180/5 "2018-08-09T16:42:07Z")

</div>

Sorry, calling it from a button on a client. (Though I would eventually need to call it from a client event script.)  
So would it need to be in the “shared” scripts instead?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 9, 2018, 4:44pm UTC](https://forum.inductiveautomation.com/t/whats-my-mssql-jdbc-driver-classname/19180/6 "2018-08-09T16:44:52Z")

</div>

No, what’s important is that you call it in such a way that it’s running on the gateway. Think tag change script, gateway timer script, message handler + `system.util.sendMessage`, etc. You can’t access a database using JDBC drivers from the client.

What you should be doing is just making a DB connection in Ignition and using the standard `system.db` calls.
