<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Seven steps &#187; databases</title>
	<atom:link href="http://trevoke.net/blog/category/databases/feed/" rel="self" type="application/rss+xml" />
	<link>http://trevoke.net/blog</link>
	<description>Martial arts and technology, $DEITY what a mix!</description>
	<lastBuildDate>Fri, 27 Apr 2012 02:32:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Fix for Windows + Rails 2.2 + Mysql 5.1 = error</title>
		<link>http://trevoke.net/blog/2009/09/25/fix-for-windows-rails-2-2-mysql-5-1-error/</link>
		<comments>http://trevoke.net/blog/2009/09/25/fix-for-windows-rails-2-2-mysql-5-1-error/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 14:58:28 +0000</pubDate>
		<dc:creator>Trevoke</dc:creator>
				<category><![CDATA[databases]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://trevoke.net/blog/?p=160</guid>
		<description><![CDATA[If you get this error : Mysql::Error: query: not connected: or one just like it, it&#8217;s because you need an older DLL.. Which I just happen to have found, because I needed to fix this problem too! libmySQL.dll Enjoy.]]></description>
			<content:encoded><![CDATA[<p>If you get this error : <em>Mysql::Error: query: not connected:</em> or one just like it, it&#8217;s because you need an older DLL.. Which I just happen to have found, because I needed to fix this problem too!<br />

<a  href="http://trevoke.net/blog/wp-content/uploads/2009/09/libmySQL.dll" onclick="javascript:pageTracker._trackPageview('/external/trevoke.net/blog/wp-content/uploads/2009/09/libmySQL.dll');" >libmySQL.dll</a></p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://trevoke.net/blog/2009/09/25/fix-for-windows-rails-2-2-mysql-5-1-error/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Connecting to Sybase with Rails on Windows XP</title>
		<link>http://trevoke.net/blog/2009/09/11/connecting-to-sybase-with-rails-on-windows-xp/</link>
		<comments>http://trevoke.net/blog/2009/09/11/connecting-to-sybase-with-rails-on-windows-xp/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 16:05:24 +0000</pubDate>
		<dc:creator>Trevoke</dc:creator>
				<category><![CDATA[databases]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://trevoke.net/blog/?p=139</guid>
		<description><![CDATA[This is known to work on ASE 12.5.1 &#8211; you&#8217;re welcome to let me know what else worked, I am particularly curious about later versions of Sybase ASE, such as 15. Prerequisites: Sybase PC Client 12.52 The Ruby Sybase  files gem install activerecord-sybase-adapter -s http://gems.rubyonrails.org Put the Sybase files in C:\ruby\lib\ruby\site_ruby\1.8\i386-msvcrt . Copy all the <a href='http://trevoke.net/blog/2009/09/11/connecting-to-sybase-with-rails-on-windows-xp/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>This is known to work on ASE 12.5.1<span style="font-size: x-small;"><span style="font-family: Verdana;"> &#8211; you&#8217;re welcome to let me know what else worked, I am particularly curious about later versions of Sybase ASE, such as 15.<br />
</span></span></p>
<p>Prerequisites:</p>
<ol>
<li>
<a title="Sybase PC Client"  href="http://trevoke.net/sybase/pcclient_1252.zip" onclick="javascript:pageTracker._trackPageview('/external/trevoke.net/sybase/pcclient_1252.zip');" >Sybase PC Client 12.52</a></li>
<li>
<a title="Ruby Sybase connection"  href="http://trevoke.net/sybase/ruby-sybase-winxp.zip" onclick="javascript:pageTracker._trackPageview('/external/trevoke.net/sybase/ruby-sybase-winxp.zip');" >The Ruby Sybase  files</a></li>
<li>gem install activerecord-sybase-adapter -s http://gems.rubyonrails.org</li>
</ol>
<p>Put the Sybase files in C:\ruby\lib\ruby\site_ruby\1.8\i386-msvcrt .</p>
<p>Copy all the DLLs in %SYBASE%\OCS-12_5\dll and put them in %RUBY%\bin (if you are not familiar with Windows notation, this simply means to go where you installed each of Sybase and Ruby and then go to the proper subdirectory). Why all of them? Well, because I&#8217;m too lazy to know which ones we -do- need.</p>
<p>Set some environment variables, just to make sure Sybase works fine:</p>
<p>Right-click on My Computer, Properties &gt; Advanced &gt; Environment Variables<br />
If you have full permissions, go ahead and add those as SYSTEM VARIABLES.. Otherwise, well, only for your user (but aren&#8217;t you doing this on a server?).</p>
<p>SYBASE=c:\sybase    (where you installed Sybase).</p>
<p>JDBC_HOME=c:\sybase\jConnect-6_0   (again, where you installed Sybase, then the subdirectory).</p>
<p>CLASSPATH=%JDBC_HOME%\classes\jconn3.jar (just make sure that&#8217;s the right number).</p>
<p>If you&#8217;re going to create a user on your Sybase server for specific Rails usage, it needs to have SELECT permissions on the following : <strong>sysobjects, syscolumns, systypes, syscomments</strong>.</p>
<p>Edit your %SYBASE%\ini\sql.ini and add the information for your server in there.</p>
<p>Next.. In Rails, the magic will look like this in database.yml :</p>
<pre class="brush: ruby; title: ; notranslate">
production:
adapter: sybase
database: &lt;YOUR_DB_HERE&gt;
username: &lt;USERNAME&gt;
password: &lt;PASSWORD&gt;
host: &lt;NAME_GIVEN_IN_SQL_INI_HERE&gt;
</pre>
<p>And that should be pretty much it!</p>
<p>Don&#8217;t forget to edit your model if you&#8217;re working with legacy data:</p>
<pre class="brush: ruby; title: ; notranslate">
class Patient &lt; ActiveRecord::Base
set_table_name &quot;some_odd_name&quot;
set_primary_key &quot;some_primary_key_column&quot;
end
</pre>
]]></content:encoded>
			<wfw:commentRss>http://trevoke.net/blog/2009/09/11/connecting-to-sybase-with-rails-on-windows-xp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails + Sybase</title>
		<link>http://trevoke.net/blog/2009/07/31/ruby-on-rails-sybase/</link>
		<comments>http://trevoke.net/blog/2009/07/31/ruby-on-rails-sybase/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 14:32:27 +0000</pubDate>
		<dc:creator>Trevoke</dc:creator>
				<category><![CDATA[databases]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sybase]]></category>

		<guid isPermaLink="false">http://trevoke.net/blog/2009/07/31/ruby-on-rails-sybase/</guid>
		<description><![CDATA[Caveat: This adapter may only work with the enterprise edition of Sybase (i.e. Sybase ASE) not with SQLAnywhere (Sybase ASA) gem install activerecord-sybase-adapter -s http://gems.rubyonrails.org ActiveRecord::Base.establish_connection( :adapter => &#8220;sybase&#8221;, :database => &#8220;test&#8221;, :host => &#8220;www.yourdbserver.com&#8221;, :username => &#8220;kevin&#8221;, :password => &#8220;test&#8221;) Play!]]></description>
			<content:encoded><![CDATA[<p>Caveat: This adapter may only work with the enterprise edition of Sybase (i.e. Sybase ASE) not with SQLAnywhere (Sybase ASA)</p>
<p>gem install activerecord-sybase-adapter -s http://gems.rubyonrails.org</p>
<p>ActiveRecord::Base.establish_connection(<br />
:adapter => &#8220;sybase&#8221;,<br />
:database => &#8220;test&#8221;,<br />
:host => &#8220;www.yourdbserver.com&#8221;,<br />
:username => &#8220;kevin&#8221;,<br />
:password => &#8220;test&#8221;)</p>
<p>Play!</p>
]]></content:encoded>
			<wfw:commentRss>http://trevoke.net/blog/2009/07/31/ruby-on-rails-sybase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Passwords, passwords</title>
		<link>http://trevoke.net/blog/2009/06/09/passwords-passwords/</link>
		<comments>http://trevoke.net/blog/2009/06/09/passwords-passwords/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 23:08:26 +0000</pubDate>
		<dc:creator>Trevoke</dc:creator>
				<category><![CDATA[databases]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[sa]]></category>
		<category><![CDATA[sybase]]></category>

		<guid isPermaLink="false">http://trevoke.net/blog/2009/06/09/passwords-passwords/</guid>
		<description><![CDATA[Default passwords for MSSQL, Sybase, and mySQL: , , , That&#8217;s right.. All three have blank root / sa passwords by default. Talk about secure! That&#8217;s the kind of knowledge that can come in handy.]]></description>
			<content:encoded><![CDATA[<p>Default passwords for MSSQL, Sybase, and mySQL:<br />
, , ,<br />
That&#8217;s right.. All three have blank root / sa passwords by default. Talk about secure! That&#8217;s the kind of knowledge that can come in handy.</p>
]]></content:encoded>
			<wfw:commentRss>http://trevoke.net/blog/2009/06/09/passwords-passwords/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.278 seconds -->

