<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157505</link>
    <title>MATLAB Central Newsreader - jdbc with matlab</title>
    <description>Feed for thread: jdbc with matlab</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 11 Oct 2007 04:23:30 -0400</pubDate>
      <title>jdbc with matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157505#396130</link>
      <author>Steven </author>
      <description>I want to use a sql server to store matlab data. I&lt;br&gt;
downloaded sql express from microsoft and set it up. I also&lt;br&gt;
set up jdbc to use with sql express and matlab. I went&lt;br&gt;
through the help file and added the classpath ect. I am now&lt;br&gt;
trying to connect to the database and have proved&lt;br&gt;
unsuccesful, I get this message every time I try and&lt;br&gt;
connect: Invalid connection&lt;br&gt;
&lt;br&gt;
conn = database('pubs','guest','******',...&lt;br&gt;
'com.microsoft.jdbc.sqlserver.SQLServerDriver',...&lt;br&gt;
'jdbc:sqlserver://localhost:1433');&lt;br&gt;
ping(conn);&lt;br&gt;
&lt;br&gt;
I have tried both the querybuilder and the above code and&lt;br&gt;
neither seem to work. I have two questions, Has anyone&lt;br&gt;
successfully implemented jdbc with sql express? And is there&lt;br&gt;
a simple way I be able to test the jdbc to ensure that the&lt;br&gt;
server works properly before I connect to matlab?</description>
    </item>
    <item>
      <pubDate>Thu, 11 Oct 2007 07:50:22 -0400</pubDate>
      <title>Re: jdbc with matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157505#396147</link>
      <author>tristram.scott@ntlworld.com (Tristram Scott)</author>
      <description>Steven  &amp;lt;burrguy.athotmailnot@msn.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; I want to use a sql server to store matlab data. I&lt;br&gt;
&amp;gt; downloaded sql express from microsoft and set it up. I also&lt;br&gt;
&amp;gt; set up jdbc to use with sql express and matlab. I went&lt;br&gt;
&amp;gt; through the help file and added the classpath ect. I am now&lt;br&gt;
&amp;gt; trying to connect to the database and have proved&lt;br&gt;
&amp;gt; unsuccesful, I get this message every time I try and&lt;br&gt;
&amp;gt; connect: Invalid connection&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; conn = database('pubs','guest','******',...&lt;br&gt;
&amp;gt; 'com.microsoft.jdbc.sqlserver.SQLServerDriver',...&lt;br&gt;
&amp;gt; 'jdbc:sqlserver://localhost:1433');&lt;br&gt;
&amp;gt; ping(conn);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have tried both the querybuilder and the above code and&lt;br&gt;
&amp;gt; neither seem to work. I have two questions, Has anyone&lt;br&gt;
&amp;gt; successfully implemented jdbc with sql express? &lt;br&gt;
&lt;br&gt;
I haven't used sql express, but SQLServer has worked for me in the past.&lt;br&gt;
&lt;br&gt;
I used code something like this:&lt;br&gt;
&lt;br&gt;
dbsrc = 'waltons'; % Datbase source&lt;br&gt;
dbuser = 'bob'; % Database User&lt;br&gt;
dbpass = 'jimbob'; % Database password&lt;br&gt;
dbdrv = 'com.microsoft.jdbc.sqlserver.SQLServerDriver';&lt;br&gt;
dburl = 'jdbc:microsoft:sqlserver://sqlhost:1433;database=waltons';&lt;br&gt;
&lt;br&gt;
dbConn = database(dbsrc,dbuser,dbpass,dbdrv,dburl); % Connect&lt;br&gt;
&lt;br&gt;
I notice that you don't have the m word in your url.  I think it might be&lt;br&gt;
necessary to write it down on this occasion, but you don't have to say it&lt;br&gt;
out loud.&lt;br&gt;
&lt;br&gt;
I specified the database in the url because the server ran more than one,&lt;br&gt;
and didn't always do the correct thing.  &lt;br&gt;
&lt;br&gt;
&amp;gt; And is there&lt;br&gt;
&amp;gt; a simple way I be able to test the jdbc to ensure that the&lt;br&gt;
&amp;gt; server works properly before I connect to matlab?&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
I guess you could follow the Java examples, since it is Java dbc.  I recall&lt;br&gt;
looking through the jdbc documentation once and finding it to be quite&lt;br&gt;
good.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Dr Tristram J. Scott               &lt;br&gt;
Energy Consultant                  </description>
    </item>
    <item>
      <pubDate>Tue, 18 Dec 2007 08:07:28 -0500</pubDate>
      <title>Re: jdbc with matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157505#406577</link>
      <author>Karan </author>
      <description>I dont think SQL express works with the string&lt;br&gt;
&lt;br&gt;
'com.microsoft.jdbc.sqlserver.SQLServerDriver'&lt;br&gt;
&lt;br&gt;
Any ideas on how one could modify this string to work for &lt;br&gt;
sql server express? &lt;br&gt;
&lt;br&gt;
&quot;Steven &quot; &amp;lt;burrguy.athotmailnot@msn.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;fek8g2$201$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I want to use a sql server to store matlab data. I&lt;br&gt;
&amp;gt; downloaded sql express from microsoft and set it up. I &lt;br&gt;
also&lt;br&gt;
&amp;gt; set up jdbc to use with sql express and matlab. I went&lt;br&gt;
&amp;gt; through the help file and added the classpath ect. I am &lt;br&gt;
now&lt;br&gt;
&amp;gt; trying to connect to the database and have proved&lt;br&gt;
&amp;gt; unsuccesful, I get this message every time I try and&lt;br&gt;
&amp;gt; connect: Invalid connection&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; conn = database('pubs','guest','******',...&lt;br&gt;
&amp;gt; 'com.microsoft.jdbc.sqlserver.SQLServerDriver',...&lt;br&gt;
&amp;gt; 'jdbc:sqlserver://localhost:1433');&lt;br&gt;
&amp;gt; ping(conn);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have tried both the querybuilder and the above code and&lt;br&gt;
&amp;gt; neither seem to work. I have two questions, Has anyone&lt;br&gt;
&amp;gt; successfully implemented jdbc with sql express? And is &lt;br&gt;
there&lt;br&gt;
&amp;gt; a simple way I be able to test the jdbc to ensure that the&lt;br&gt;
&amp;gt; server works properly before I connect to matlab?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  &lt;br&gt;
&amp;gt; </description>
    </item>
    <item>
      <pubDate>Fri, 27 Nov 2009 15:15:19 -0500</pubDate>
      <title>Re: jdbc with matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157505#697960</link>
      <author>koen </author>
      <description>anyone with a solution for that?&lt;br&gt;
I can't connect to a sql server 2008 database either this way.</description>
    </item>
    <item>
      <pubDate>Thu, 03 Dec 2009 16:33:20 -0500</pubDate>
      <title>Re: jdbc with matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157505#699564</link>
      <author>Oleg Komarov</author>
      <description>&quot;koen &quot; &amp;lt;petrov_vik@hotmail.com&amp;gt; wrote in message &amp;lt;heoqe7$9tn$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; anyone with a solution for that?&lt;br&gt;
&amp;gt; I can't connect to a sql server 2008 database either this way.&lt;br&gt;
have you tried my submission?&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/25577-ms-sql-jdbc-connection&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/25577-ms-sql-jdbc-connection&lt;/a&gt;</description>
    </item>
  </channel>
</rss>

