Connect Matlab to Sql server

17 vues (au cours des 30 derniers jours)
fatma ghozzi
fatma ghozzi le 5 Mai 2014
Commenté : Friedrich le 6 Mai 2014
I try to connect to Sql server via a jdbc driver : sqljjdbc4 is already insatalled and this is my code :
db = database('ChifcoProd-2013-12-12-11-37', 'dg', 'pass', '',...
db =
Instance: 'ChifcoProd-2013-12-12-11-37'
UserName: 'dg'
Driver: []
URL: []
Constructor: [1x1 com.mathworks.toolbox.database.databaseConnect]
Message: 'JDBC Driver Error: Driver Not Found/Loaded.'
Handle: 0
TimeOut: []
AutoCommit: 'off'
Type: 'Database Object'

Réponse acceptée

Friedrich le 5 Mai 2014
have you followed the instructions here. Basically you need to add the driver jar to MATLAB JAVA Classpath. How this is done is explained in the link I posted.
  3 commentaires
fatma ghozzi
fatma ghozzi le 5 Mai 2014
Modifié(e) : fatma ghozzi le 5 Mai 2014
the problem that I don't know what means exactly '' and what should I write in stade
Friedrich le 6 Mai 2014
According to the doc (see the bottom of database function page) the pair is of the format:
JDBC driver:
Database URL: jdbc:sqlserver://localhost:port;database=databasename
Try adjusting your call to match that format and try again.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by