Sitingbull
Sitingbull

Reputation: 21

Unable to connect a SQL SERVER database to MATLAB

Thanks again for answering my question. I have searched thoroughly the forum for possible answers but I could not find any success. I am trying to connect my SQL SERVER database to MATLAB. I have created an ODBC connection but its telling me the following the message : {Microsoft][ODBC Driver Manager] Invalid String or Buffer Length. I heard that there might be issues with 64b version with some database, so I decided to change the IPALL port to 1433 on SQL configuration, note that here I have only client protocols under SQL NATIVE CLIENT configuration 32b, so i dont have the IPALL section, just TCP/IP with 1433, which is already correct. I am using a windows authentification.

So I decided to use a JDBC to see if it works, I did modified the txt files, classpath.txt and librarypath. Then I configured the JDBC in the matlab but I am getting :

The TCP/IP connection to the host localhost, port 1433 has failed. Error: "null. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall"

I dont know how to make this connection work, could you please help me? I am a rookie.

Note that my database is local, everything is local, my sql server have some tables which i want to get on MATLAB through ODBC or JDBC. I have created ODBC sources. As said earlier, I dont have any kind of SQL server per se in the config, the TCP/IP is only under client protocols under SQL Native Client 11

Hope its clear for you and thanks in advance.

S.

Upvotes: 1

Views: 472

Answers (1)

Amir Rad
Amir Rad

Reputation: 11

I had the same problem with 64bit version of windows. I tried windows 32b and it works now. you can also watch this short clip on how to configure ODBC connection: www.youtube.com/watch?v=DqbEHG2oAHg

Upvotes: 1

Related Questions