<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hailin,<br>
thanks for your reply.<br>
when I run :<br>
$c-&gt;stash(ages =&gt; [$c-&gt;model('DB::Age')-&gt;all]);
<br>
it get error,<br>
<br>
I am run on Windows 7, with [Microsoft][ODBC SQL Server Driver][SQL
Server]<br>
<br>
I tried to switch to Sqlite to do a test, it runs good.<br>
<br>
I also try to connect to another table in the same sql server database,
the error came again.<br>
the strange thing is after a reload of the same page, the problem gone.<br>
<br>
but restart the Catalyst server, it show up for the first connection<br>
<br>
Hugh Wang<br>
<br>
<br>
Hailin Hu &#20889;&#36947;:
<blockquote
 cite="midCADfKhsefgfpowNcKT7_0NrGxGBYUcCVNwZhjXimdNGy4w=1ieA@mail.gmail.com"
 type="cite">
  <pre wrap="">It seems the error only occurs on connection.
Do you have any sql statement in on_connect_do, which SQL server can't
execute correctly?

On Thu, Jun 6, 2013 at 2:38 PM, Hugh Wang <a class="moz-txt-link-rfc2396E" href="mailto:yowang@verizon.net">&lt;yowang@verizon.net&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">I am trying to use Catalyst, with DBIx::Class to connect to a MS
Sqlserver database.
after  I start the Catalyst server,
perl script/libApp_server.pl -r

I connect to a page to open a table and display it,
but the first time when I open the page,
such as:   <a class="moz-txt-link-freetext" href="http://localhost:3000/admin/ticket">http://localhost:3000/admin/ticket</a>

it shows error:

[error] DBIx::Class::Storage::DBI::_do_query(): DBI Exception:
DBD::ODBC::db do
failed: [Microsoft][ODBC SQL Server Driver][SQL Server]'=' Grammer Error
nearby (SQL
-42000)(DBD: Execute immediate failed err=-1) at
K:\LibApp\lib/LibApp/Controller
/admin.pm line 47

but after I refresh to reload the page, it works good .
if I restart the server, the error will show up again for the first time
I open the same web page.
the refresh of the same page, will work good.

what's wrong with it?  any one has experience

thanks

Hugh Wang

_______________________________________________
List: <a class="moz-txt-link-freetext" href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class</a>
IRC: irc.perl.org#dbix-class
SVN: <a class="moz-txt-link-freetext" href="http://dev.catalyst.perl.org/repos/bast/DBIx-Class/">http://dev.catalyst.perl.org/repos/bast/DBIx-Class/</a>
Searchable Archive: <a class="moz-txt-link-freetext" href="http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk">http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->
_______________________________________________
List: <a class="moz-txt-link-freetext" href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class</a>
IRC: irc.perl.org#dbix-class
SVN: <a class="moz-txt-link-freetext" href="http://dev.catalyst.perl.org/repos/bast/DBIx-Class/">http://dev.catalyst.perl.org/repos/bast/DBIx-Class/</a>
Searchable Archive: <a class="moz-txt-link-freetext" href="http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk">http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk</a>

  </pre>
</blockquote>
<br>
</body>
</html>