Matlab JDBC to SQL Server

Hi, experts

I would like to connect Matlab to SQL Server. this is my environment.

OS: 64 Bits Windows 7
SQL Server: SQL Server 2008 R2 64 bits
Matlab 2011b 64 bit

To my understanding, based on my environment, ODBC is not going to work. So I try to use JDBC. Please see my screen capture.
 procedure.png
I have add sqljdbc.jar to classpath.txt and looks like I successfuy create the conn object. but why still not work.
could you please help me about this. thanks in advance.
rmtogetherAsked:
Who is Participating?
 
yuk99Connect With a Mentor Commented:
It looks like your jdbc driver is not setup properly. The driver property of connection is empty.
I would recommend to use dynamic java class path with javaaddpath command.
javaaddpath(pathtojarfile)

You can check if connection is established with isconnection function.
If it returns true get cursor object.
0
 
rmtogetherAuthor Commented:
thanks. I have to also enable TCP 1433 from sql server configuration.
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.