<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'Problem with import from databases - Array' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'Problem with import from databases - Array' posted on the 'Matlab' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 18 May 2013 20:07:20 -0700</pubDate>
    <lastBuildDate>Sat, 18 May 2013 20:07:20 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Problem with import from databases - Array</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/430343/430343/problem-with-import-from-databases---array/</link>
      <description>Hi everyone, i have a problem with i can't beat down. Exacly: i want to connect co my database in embedded matlab function by the code:&lt;br /&gt;
&lt;br /&gt;
-------------------------&lt;br /&gt;
function TF = polaczenie_funkcja (ID)&lt;br /&gt;
&lt;br /&gt;
eml.extrinsic('database')&lt;br /&gt;
conn=database('connection','user','password');&lt;br /&gt;
eml.extrinsic('exec')&lt;br /&gt;
curs5 = exec(conn, 'select zaklocenia from zbiornik_praca where ID_Zbiornik=1');&lt;br /&gt;
eml.extrinsic('fetch')&lt;br /&gt;
eml.extrinsic('setdbprefs')&lt;br /&gt;
setdbprefs('DataReturnFormat','numeric')&lt;br /&gt;
curs5=fetch(curs5);&lt;br /&gt;
m=curs5.data(1)&lt;br /&gt;
TF = strcmp('No data',m); &lt;br /&gt;
-------------------------------&lt;br /&gt;
&lt;br /&gt;
I have a error in line with m=curs5.data(1). ("Attempt to extract field 'data' from 'mxArray'."). Maybe You can help? :)&lt;br /&gt;
&lt;br /&gt;
Greetings, &lt;br /&gt;
pawelwalcz&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/430343/430343/problem-with-import-from-databases---array/</guid>
      <pubDate>Wed, 21 Nov 2012 12:23:31 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Re: Problem with import from databases - Array</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/430343/430361/re-problem-with-import-from-databases---array/#430361</link>
      <description>I already solved it, checking is there a available rows by using numrows=rows(curs) and eml.extinsic to all functions insted of using sctrcmp(). But now i have a new problem when i try to run it in rapid acceleration mode (in normal mode it runs properly) it gives me a error "failed to eliminate a use of the MATLAB function 'database'. For non-simulation builds, uses of unsupported MATLAB functions are eliminated if they do not affect function outputs." &lt;br /&gt;
&lt;br /&gt;
Any ideas??&lt;br /&gt;
&lt;br /&gt;
here is my new code:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
function numrows    = polaczenie_funkcja (ID) 
eml.extrinsic('database') 
 conn=database('polaczenie','user','password'); 
eml.extrinsic('exec')        
eml.extrinsic('num2str'); 
 curs = exec(conn, ['select* from zbiornik_praca where ID_Zbiornik=  ' num2str(ID) ' ']); 
eml.extrinsic('fetch') 
 curs=fetch(curs); 
eml.extrinsic('rows') 
 numrows=4;             
 numrows=rows(curs)      
end 
&lt;/pre&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/430343/430361/re-problem-with-import-from-databases---array/#430361</guid>
      <pubDate>Thu, 22 Nov 2012 02:04:30 -0700</pubDate>
      <category>Matlab</category>
    </item>
  </channel>
</rss>