• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1625
  • Last Modified:

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.
0
rmtogether
Asked:
rmtogether
1 Solution
 
yuk99Commented:
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now