Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: arcusfelis/arcusfelis.github.com
base: b281479ecd
...
head fork: arcusfelis/arcusfelis.github.com
compare: 0f719cff44
  • 4 commits
  • 20 files changed
  • 0 commit comments
  • 1 contributor
36 about/index.html
View
@@ -5,11 +5,11 @@
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
- <title>Uvarov Michael - freeakk.github.com</title>
+ <title>Uvarov Michael - arcusfelis.github.com</title>
<meta name="author" content="Uvarov Michael">
- <meta name="description" content="Uvarov Michael May 24th, 2012 Information Name: Uvarov Michael E-mail: freeakk@gmail.com Skype: user-ok Student 2008-2013, Southern Federal &hellip;">
+ <meta name="description" content="Uvarov Michael May 24th, 2012 Information Name: Uvarov Michael E-mail: arcusfelis@gmail.com Skype: user-ok Student 2008-2013, Southern Federal &hellip;">
<!-- http://t.co/dKP3o1e -->
@@ -18,13 +18,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="canonical" href="http://freeakk.github.com/about">
+ <link rel="canonical" href="http://arcusfelis.github.com/about">
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="/javascripts/ender.js"></script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
- <link href="/atom.xml" rel="alternate" title="freeakk.github.com" type="application/atom+xml">
+ <link href="/atom.xml" rel="alternate" title="arcusfelis.github.com" type="application/atom+xml">
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
@@ -35,7 +35,7 @@
<body class="collapse-sidebar sidebar-footer" >
<header role="banner"><hgroup>
- <h1><a href="/">freeakk.github.com</a></h1>
+ <h1><a href="/">arcusfelis.github.com</a></h1>
</hgroup>
@@ -47,7 +47,7 @@
<form action="http://google.com/search" method="get">
<fieldset role="search">
- <input type="hidden" name="q" value="site:freeakk.github.com" />
+ <input type="hidden" name="q" value="site:arcusfelis.github.com" />
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
</fieldset>
</form>
@@ -85,7 +85,7 @@ <h1 class="entry-title">Uvarov Michael</h1>
<p><strong>Name</strong>: Uvarov Michael</p>
-<p><strong>E-mail</strong>: freeakk@gmail.com</p>
+<p><strong>E-mail</strong>: arcusfelis@gmail.com</p>
<p><strong>Skype</strong>: user-ok</p>
@@ -142,7 +142,7 @@ <h1 class="entry-title">Uvarov Michael</h1>
</ul>
-<p>The result is <a href="https://code.launchpad.net/~freeakk/shelly/trunk">here</a>.</p>
+<p>The result is <a href="https://code.launchpad.net/~arcusfelis/shelly/trunk">here</a>.</p>
<p>First of all, I tried Java (and Spring Framework). It has an application
state (which PHP has not) and advanced Web tools.</p>
@@ -162,7 +162,7 @@ <h1 class="entry-title">Uvarov Michael</h1>
<p>I started learing with the real-life application:</p>
-<p><a href="https://github.com/freeakk/ux">https://github.com/freeakk/ux</a></p>
+<p><a href="https://github.com/arcusfelis/ux">https://github.com/arcusfelis/ux</a></p>
<p>I used:</p>
@@ -189,13 +189,13 @@ <h1 class="entry-title">Uvarov Michael</h1>
<p>Results are here:
-<a href="https://github.com/freeakk/web_col">https://github.com/freeakk/web_col</a></p>
+<a href="https://github.com/arcusfelis/web_col">https://github.com/arcusfelis/web_col</a></p>
<p>Then I try to realize NIFs for ICU:
-<a href="https://github.com/freeakk/i18n">https://github.com/freeakk/i18n</a></p>
+<a href="https://github.com/arcusfelis/i18n">https://github.com/arcusfelis/i18n</a></p>
<p>And another gettext realization based on ICU:
-<a href="https://github.com/freeakk/l10n">https://github.com/freeakk/l10n</a></p>
+<a href="https://github.com/arcusfelis/l10n">https://github.com/arcusfelis/l10n</a></p>
<p>I used:</p>
@@ -213,7 +213,7 @@ <h1 class="entry-title">Uvarov Michael</h1>
Open Source Search Engine Library Xapian.</p>
<p>Here is code:
-<a href="https://github.com/freeakk/xapian">https://github.com/freeakk/xapian</a></p>
+<a href="https://github.com/arcusfelis/xapian">https://github.com/arcusfelis/xapian</a></p>
<p>I used:</p>
@@ -261,7 +261,7 @@ <h1 class="entry-title">Uvarov Michael</h1>
<div class="sharing">
- <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://freeakk.github.com/about/index.html" data-via="" data-counturl="http://freeakk.github.com/about/index.html" >Tweet</a>
+ <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://arcusfelis.github.com/about/index.html" data-via="" data-counturl="http://arcusfelis.github.com/about/index.html" >Tweet</a>
@@ -281,6 +281,14 @@ <h1 class="entry-title">Uvarov Michael</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/blog/2012/07/02/odbc-sql/">ODBC, MS SQL Server and Erlang</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2012/07/02/odbc/">Install ODBC and MS SQL Server client for Erlang</a>
+ </li>
+
+ <li class="post">
<a href="/blog/2012/07/02/dialyzer/">Dialyzer</a>
</li>
178 atom.xml
View
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
- <title><![CDATA[freeakk.github.com]]></title>
- <link href="http://freeakk.github.com/atom.xml" rel="self"/>
- <link href="http://freeakk.github.com/"/>
- <updated>2012-08-27T21:35:04+04:00</updated>
- <id>http://freeakk.github.com/</id>
+ <title><![CDATA[arcusfelis.github.com]]></title>
+ <link href="http://arcusfelis.github.com/atom.xml" rel="self"/>
+ <link href="http://arcusfelis.github.com/"/>
+ <updated>2012-12-14T14:45:35+04:00</updated>
+ <id>http://arcusfelis.github.com/</id>
<author>
<name><![CDATA[Uvarov Michael]]></name>
@@ -14,10 +14,170 @@
<entry>
+ <title type="html"><![CDATA[ODBC, MS SQL Server and Erlang]]></title>
+ <link href="http://arcusfelis.github.com/blog/2012/07/02/odbc-sql/"/>
+ <updated>2012-07-02T19:12:00+04:00</updated>
+ <id>http://arcusfelis.github.com/blog/2012/07/02/odbc-sql</id>
+ <content type="html"><![CDATA[<h2>Date and time</h2>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>odbc:sql_query(S, "SELECT {fn CURDATE()}").
+</span><span class='line'>{selected,[[]],[{"2012-10-02"}]}</span></code></pre></td></tr></table></div></figure>
+
+
+
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>odbc:sql_query(S, "SELECT getdate()").
+</span><span class='line'>{selected,[[]],[{ { {2012,10,23},{2,6,37} } }]}</span></code></pre></td></tr></table></div></figure>
+
+
+<p><code>{ {2012,10,23},{2,6,37} }</code> has a type <code>sql_datetime</code>.</p>
+]]></content>
+ </entry>
+
+ <entry>
+ <title type="html"><![CDATA[Install ODBC and MS SQL Server client for Erlang]]></title>
+ <link href="http://arcusfelis.github.com/blog/2012/07/02/odbc/"/>
+ <updated>2012-07-02T19:12:00+04:00</updated>
+ <id>http://arcusfelis.github.com/blog/2012/07/02/odbc</id>
+ <content type="html"><![CDATA[<p>Here we are connecting to MS SQL Server 2008 on MS Windows XP from Erlang on Debian Linux.</p>
+
+<h2>Part 1</h2>
+
+<p>Install utilities (FreeTDS SQL client):</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'># apt-get freetds-bin freetds-dev</span></code></pre></td></tr></table></div></figure>
+
+
+<p>Try to connect with the <code>tsql</code> command from the <code>freetds-bin</code> package:</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>tsql -H %ip_address_or_hostname% -p %port_number% -U %username% -P %password%</span></code></pre></td></tr></table></div></figure>
+
+
+<p>or (with actual values for me):</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>$ tsql -H PI -p 1433 -U test -P test
+</span><span class='line'>locale is "en_US.UTF-8"
+</span><span class='line'>locale charset is "UTF-8"
+</span><span class='line'>using default charset "UTF-8"
+</span><span class='line'>1&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>If you see the counter (1, 2, 3, &#8230;), most likely tsql is unable to connect to
+the indicated server. Check the firewall&#8217;s settings.</p>
+
+<p><code>sqsh</code> is an alternative for <code>tsql</code> (more powerful).</p>
+
+<h2>Part 2</h2>
+
+<p>Install the ODBC client driver.</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>apt-get install tdsodbc</span></code></pre></td></tr></table></div></figure>
+
+
+<h2>Problems? Part 2a</h2>
+
+<p><code>tdsodbc</code> uses <code>unixodbc</code> library, that conflicts with <code>libiodbc2</code>. <code>libiodbc2</code>
+is a dependency for soprano, that is a dependency for the most of KDE applications.</p>
+
+<p>So, you cannot use the KDE and UnixODBC in Debian (the bug from 2011 year).</p>
+
+<p>This conflict can be fixed, downloading the patched versions of the packages from
+here:</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>http://packages.ubuntu.com/precise/libsoprano4
+</span><span class='line'>http://packages.ubuntu.com/precise/i386/soprano-daemon</span></code></pre></td></tr></table></div></figure>
+
+
+<p>If you don&#8217;t use KDE or the bug was fixed, skip this step.</p>
+
+<h2>Part 3</h2>
+
+<p>Update the config files:</p>
+
+<p>/etc/odbc.ini</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+<span class='line-number'>6</span>
+<span class='line-number'>7</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>[odbc-test]
+</span><span class='line'>Description = test
+</span><span class='line'>Driver = ms-sql
+</span><span class='line'>Servername = odbc-test
+</span><span class='line'>UID = test
+</span><span class='line'>Database = test_db
+</span><span class='line'>Port = 1433</span></code></pre></td></tr></table></div></figure>
+
+
+<p>/etc/odbcinst.ini</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+<span class='line-number'>6</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>[ms-sql]
+</span><span class='line'>Description = TDS connection
+</span><span class='line'>Driver = /usr/lib/i386-linux-gnu/odbc/libtdsodbc.so
+</span><span class='line'>Setup = /usr/lib/i386-linux-gnu/odbc/libtdsS.so
+</span><span class='line'>UsageCount = 1
+</span><span class='line'>FileUsage = 1</span></code></pre></td></tr></table></div></figure>
+
+
+<p>Test it:</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>$isql -v odbc-test test test
+</span><span class='line'>SQL&gt;</span></code></pre></td></tr></table></div></figure>
+
+
+<h2>Part 4</h2>
+
+<p>Try it from Erlang:</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+<span class='line-number'>6</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>1&gt; odbc:start().
+</span><span class='line'>ok
+</span><span class='line'>2&gt; {ok, S} = odbc:connect("DSN=odbc-test;UID=test;PWD=test", []).
+</span><span class='line'>{ok,&lt;0.44.0&gt;}
+</span><span class='line'>3&gt; odbc:sql_query(S, "SELECT 1").
+</span><span class='line'>{selected,[[]],[{1}]}</span></code></pre></td></tr></table></div></figure>
+
+
+
+]]></content>
+ </entry>
+
+ <entry>
<title type="html"><![CDATA[Dialyzer]]></title>
- <link href="http://freeakk.github.com/blog/2012/07/02/dialyzer/"/>
+ <link href="http://arcusfelis.github.com/blog/2012/07/02/dialyzer/"/>
<updated>2012-07-02T19:12:00+04:00</updated>
- <id>http://freeakk.github.com/blog/2012/07/02/dialyzer</id>
+ <id>http://arcusfelis.github.com/blog/2012/07/02/dialyzer</id>
<content type="html"><![CDATA[<p>Dializer is a static analysis tool.
It uses Persistent Lookup Table for storing information.
First of all, we need to build PLT:</p>
@@ -73,9 +233,9 @@ compilation time but it may result in (much) longer analysis time.</li>
<entry>
<title type="html"><![CDATA[Pipes]]></title>
- <link href="http://freeakk.github.com/blog/2012/06/15/pipes/"/>
+ <link href="http://arcusfelis.github.com/blog/2012/06/15/pipes/"/>
<updated>2012-06-15T18:23:00+04:00</updated>
- <id>http://freeakk.github.com/blog/2012/06/15/pipes</id>
+ <id>http://arcusfelis.github.com/blog/2012/06/15/pipes</id>
<content type="html"><![CDATA[<h1>Using Xapian through a pipe</h1>
<p>To avoid linking with Xapian you can use a port:</p>
20 blog/2012/06/15/pipes/index.html
View
@@ -5,7 +5,7 @@
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
- <title>Pipes - freeakk.github.com</title>
+ <title>Pipes - arcusfelis.github.com</title>
<meta name="author" content="Uvarov Michael">
@@ -19,13 +19,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="canonical" href="http://freeakk.github.com/blog/2012/06/15/pipes">
+ <link rel="canonical" href="http://arcusfelis.github.com/blog/2012/06/15/pipes">
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="/javascripts/ender.js"></script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
- <link href="/atom.xml" rel="alternate" title="freeakk.github.com" type="application/atom+xml">
+ <link href="/atom.xml" rel="alternate" title="arcusfelis.github.com" type="application/atom+xml">
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
@@ -36,7 +36,7 @@
<body >
<header role="banner"><hgroup>
- <h1><a href="/">freeakk.github.com</a></h1>
+ <h1><a href="/">arcusfelis.github.com</a></h1>
</hgroup>
@@ -48,7 +48,7 @@
<form action="http://google.com/search" method="get">
<fieldset role="search">
- <input type="hidden" name="q" value="site:freeakk.github.com" />
+ <input type="hidden" name="q" value="site:arcusfelis.github.com" />
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
</fieldset>
</form>
@@ -142,7 +142,7 @@ <h1 class="entry-title">Pipes</h1>
<div class="sharing">
- <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://freeakk.github.com/blog/2012/06/15/pipes/" data-via="" data-counturl="http://freeakk.github.com/blog/2012/06/15/pipes/" >Tweet</a>
+ <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://arcusfelis.github.com/blog/2012/06/15/pipes/" data-via="" data-counturl="http://arcusfelis.github.com/blog/2012/06/15/pipes/" >Tweet</a>
@@ -167,6 +167,14 @@ <h1 class="entry-title">Pipes</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/blog/2012/07/02/odbc-sql/">ODBC, MS SQL Server and Erlang</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2012/07/02/odbc/">Install ODBC and MS SQL Server client for Erlang</a>
+ </li>
+
+ <li class="post">
<a href="/blog/2012/07/02/dialyzer/">Dialyzer</a>
</li>
22 blog/2012/07/02/dialyzer/index.html
View
@@ -5,7 +5,7 @@
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
- <title>Dialyzer - freeakk.github.com</title>
+ <title>Dialyzer - arcusfelis.github.com</title>
<meta name="author" content="Uvarov Michael">
@@ -21,13 +21,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="canonical" href="http://freeakk.github.com/blog/2012/07/02/dialyzer">
+ <link rel="canonical" href="http://arcusfelis.github.com/blog/2012/07/02/dialyzer">
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="/javascripts/ender.js"></script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
- <link href="/atom.xml" rel="alternate" title="freeakk.github.com" type="application/atom+xml">
+ <link href="/atom.xml" rel="alternate" title="arcusfelis.github.com" type="application/atom+xml">
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
@@ -38,7 +38,7 @@
<body >
<header role="banner"><hgroup>
- <h1><a href="/">freeakk.github.com</a></h1>
+ <h1><a href="/">arcusfelis.github.com</a></h1>
</hgroup>
@@ -50,7 +50,7 @@
<form action="http://google.com/search" method="get">
<fieldset role="search">
- <input type="hidden" name="q" value="site:freeakk.github.com" />
+ <input type="hidden" name="q" value="site:arcusfelis.github.com" />
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
</fieldset>
</form>
@@ -178,7 +178,7 @@ <h1 class="entry-title">Dialyzer</h1>
<div class="sharing">
- <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://freeakk.github.com/blog/2012/07/02/dialyzer/" data-via="" data-counturl="http://freeakk.github.com/blog/2012/07/02/dialyzer/" >Tweet</a>
+ <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://arcusfelis.github.com/blog/2012/07/02/dialyzer/" data-via="" data-counturl="http://arcusfelis.github.com/blog/2012/07/02/dialyzer/" >Tweet</a>
@@ -190,6 +190,8 @@ <h1 class="entry-title">Dialyzer</h1>
<a class="basic-alignment left" href="/blog/2012/06/15/pipes/" title="Previous Post: Pipes">&laquo; Pipes</a>
+ <a class="basic-alignment right" href="/blog/2012/07/02/odbc/" title="Next Post: Install ODBC and MS SQL Server client for Erlang">Install ODBC and MS SQL Server client for Erlang &raquo;</a>
+
</p>
</footer>
</article>
@@ -203,6 +205,14 @@ <h1 class="entry-title">Dialyzer</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/blog/2012/07/02/odbc-sql/">ODBC, MS SQL Server and Erlang</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2012/07/02/odbc/">Install ODBC and MS SQL Server client for Erlang</a>
+ </li>
+
+ <li class="post">
<a href="/blog/2012/07/02/dialyzer/">Dialyzer</a>
</li>
234 blog/2012/07/02/odbc-sql/index.html
View
@@ -0,0 +1,234 @@
+
+<!DOCTYPE html>
+<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
+<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
+<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
+<head>
+ <meta charset="utf-8">
+ <title>ODBC, MS SQL Server and Erlang - arcusfelis.github.com</title>
+ <meta name="author" content="Uvarov Michael">
+
+
+ <meta name="description" content="Date and time 1
+2
+odbc:sql_query(S, "SELECT {fn CURDATE()}").
+{selected,[[]],[{"2012-10-02"}]} 1
+2
+odbc:sql_query(S, "SELECT getdate()").
+{selected &hellip;">
+
+
+ <!-- http://t.co/dKP3o1e -->
+ <meta name="HandheldFriendly" content="True">
+ <meta name="MobileOptimized" content="320">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+
+
+ <link rel="canonical" href="http://arcusfelis.github.com/blog/2012/07/02/odbc-sql">
+ <link href="/favicon.png" rel="icon">
+ <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
+ <script src="/javascripts/modernizr-2.0.js"></script>
+ <script src="/javascripts/ender.js"></script>
+ <script src="/javascripts/octopress.js" type="text/javascript"></script>
+ <link href="/atom.xml" rel="alternate" title="arcusfelis.github.com" type="application/atom+xml">
+ <!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
+<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
+<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
+
+
+
+</head>
+
+<body >
+ <header role="banner"><hgroup>
+ <h1><a href="/">arcusfelis.github.com</a></h1>
+
+</hgroup>
+
+</header>
+ <nav role="navigation"><ul class="subscription" data-subscription="rss">
+ <li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
+
+</ul>
+
+<form action="http://google.com/search" method="get">
+ <fieldset role="search">
+ <input type="hidden" name="q" value="site:arcusfelis.github.com" />
+ <input class="search" type="text" name="q" results="0" placeholder="Search"/>
+ </fieldset>
+</form>
+
+<ul class="main-navigation">
+ <li><a href="/">Blog</a></li>
+ <li><a href="/blog/archives">Archives</a></li>
+ <li><a href="/about">About me</a></li>
+</ul>
+
+</nav>
+ <div id="main">
+ <div id="content">
+ <div>
+<article class="hentry" role="article">
+
+ <header>
+
+ <h1 class="entry-title">ODBC, MS SQL Server and Erlang</h1>
+
+
+ <p class="meta">
+
+
+
+
+
+
+
+
+
+
+
+
+<time datetime="2012-07-02T19:12:00+04:00" pubdate data-updated="true">Jul 2<span>nd</span>, 2012</time>
+
+ </p>
+
+ </header>
+
+
+<div class="entry-content"><h2>Date and time</h2>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>odbc:sql_query(S, "SELECT {fn CURDATE()}").
+</span><span class='line'>{selected,[[]],[{"2012-10-02"}]}</span></code></pre></td></tr></table></div></figure>
+
+
+
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>odbc:sql_query(S, "SELECT getdate()").
+</span><span class='line'>{selected,[[]],[{ { {2012,10,23},{2,6,37} } }]}</span></code></pre></td></tr></table></div></figure>
+
+
+<p><code>{ {2012,10,23},{2,6,37} }</code> has a type <code>sql_datetime</code>.</p>
+</div>
+
+
+ <footer>
+ <p class="meta">
+
+
+
+<span class="byline author vcard">Posted by <span class="fn">Uvarov Michael</span></span>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<time datetime="2012-07-02T19:12:00+04:00" pubdate data-updated="true">Jul 2<span>nd</span>, 2012</time>
+
+
+<span class="categories">
+
+ <a class='category' href='/blog/categories/erlang/'>Erlang</a>, <a class='category' href='/blog/categories/odbc/'>ODBC</a>, <a class='category' href='/blog/categories/datetime/'>datetime</a>
+
+</span>
+
+
+ </p>
+
+ <div class="sharing">
+
+ <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://arcusfelis.github.com/blog/2012/07/02/odbc-sql/" data-via="" data-counturl="http://arcusfelis.github.com/blog/2012/07/02/odbc-sql/" >Tweet</a>
+
+
+
+</div>
+
+
+ <p class="meta">
+
+ <a class="basic-alignment left" href="/blog/2012/07/02/odbc/" title="Previous Post: Install ODBC and MS SQL Server client for Erlang">&laquo; Install ODBC and MS SQL Server client for Erlang</a>
+
+
+ </p>
+ </footer>
+</article>
+
+</div>
+
+<aside class="sidebar">
+
+ <section>
+ <h1>Recent Posts</h1>
+ <ul id="recent_posts">
+
+ <li class="post">
+ <a href="/blog/2012/07/02/odbc-sql/">ODBC, MS SQL Server and Erlang</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2012/07/02/odbc/">Install ODBC and MS SQL Server client for Erlang</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2012/07/02/dialyzer/">Dialyzer</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2012/06/15/pipes/">Pipes</a>
+ </li>
+
+ </ul>
+</section>
+
+
+
+
+
+
+
+</aside>
+
+
+ </div>
+ </div>
+ <footer role="contentinfo"><p>
+ Copyright &copy; 2012 - Uvarov Michael -
+ <span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
+</p>
+
+</footer>
+
+
+
+
+
+
+
+
+ <script type="text/javascript">
+ (function(){
+ var twitterWidgets = document.createElement('script');
+ twitterWidgets.type = 'text/javascript';
+ twitterWidgets.async = true;
+ twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
+ document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
+ })();
+ </script>
+
+
+
+
+
+</body>
+</html>
341 blog/2012/07/02/odbc/index.html
View
@@ -0,0 +1,341 @@
+
+<!DOCTYPE html>
+<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
+<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
+<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
+<head>
+ <meta charset="utf-8">
+ <title>Install ODBC and MS SQL Server client for Erlang - arcusfelis.github.com</title>
+ <meta name="author" content="Uvarov Michael">
+
+
+ <meta name="description" content="Here we are connecting to MS SQL Server 2008 on MS Windows XP from Erlang on Debian Linux. Part 1 Install utilities (FreeTDS SQL client): 1
+# apt-get &hellip;">
+
+
+ <!-- http://t.co/dKP3o1e -->
+ <meta name="HandheldFriendly" content="True">
+ <meta name="MobileOptimized" content="320">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+
+
+ <link rel="canonical" href="http://arcusfelis.github.com/blog/2012/07/02/odbc">
+ <link href="/favicon.png" rel="icon">
+ <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
+ <script src="/javascripts/modernizr-2.0.js"></script>
+ <script src="/javascripts/ender.js"></script>
+ <script src="/javascripts/octopress.js" type="text/javascript"></script>
+ <link href="/atom.xml" rel="alternate" title="arcusfelis.github.com" type="application/atom+xml">
+ <!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
+<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
+<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
+
+
+
+</head>
+
+<body >
+ <header role="banner"><hgroup>
+ <h1><a href="/">arcusfelis.github.com</a></h1>
+
+</hgroup>
+
+</header>
+ <nav role="navigation"><ul class="subscription" data-subscription="rss">
+ <li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
+
+</ul>
+
+<form action="http://google.com/search" method="get">
+ <fieldset role="search">
+ <input type="hidden" name="q" value="site:arcusfelis.github.com" />
+ <input class="search" type="text" name="q" results="0" placeholder="Search"/>
+ </fieldset>
+</form>
+
+<ul class="main-navigation">
+ <li><a href="/">Blog</a></li>
+ <li><a href="/blog/archives">Archives</a></li>
+ <li><a href="/about">About me</a></li>
+</ul>
+
+</nav>
+ <div id="main">
+ <div id="content">
+ <div>
+<article class="hentry" role="article">
+
+ <header>
+
+ <h1 class="entry-title">Install ODBC and MS SQL Server Client for Erlang</h1>
+
+
+ <p class="meta">
+
+
+
+
+
+
+
+
+
+
+
+
+<time datetime="2012-07-02T19:12:00+04:00" pubdate data-updated="true">Jul 2<span>nd</span>, 2012</time>
+
+ </p>
+
+ </header>
+
+
+<div class="entry-content"><p>Here we are connecting to MS SQL Server 2008 on MS Windows XP from Erlang on Debian Linux.</p>
+
+<h2>Part 1</h2>
+
+<p>Install utilities (FreeTDS SQL client):</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'># apt-get freetds-bin freetds-dev</span></code></pre></td></tr></table></div></figure>
+
+
+<p>Try to connect with the <code>tsql</code> command from the <code>freetds-bin</code> package:</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>tsql -H %ip_address_or_hostname% -p %port_number% -U %username% -P %password%</span></code></pre></td></tr></table></div></figure>
+
+
+<p>or (with actual values for me):</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>$ tsql -H PI -p 1433 -U test -P test
+</span><span class='line'>locale is "en_US.UTF-8"
+</span><span class='line'>locale charset is "UTF-8"
+</span><span class='line'>using default charset "UTF-8"
+</span><span class='line'>1&gt;
+</span></code></pre></td></tr></table></div></figure>
+
+
+<p>If you see the counter (1, 2, 3, &#8230;), most likely tsql is unable to connect to
+the indicated server. Check the firewall&#8217;s settings.</p>
+
+<p><code>sqsh</code> is an alternative for <code>tsql</code> (more powerful).</p>
+
+<h2>Part 2</h2>
+
+<p>Install the ODBC client driver.</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>apt-get install tdsodbc</span></code></pre></td></tr></table></div></figure>
+
+
+<h2>Problems? Part 2a</h2>
+
+<p><code>tdsodbc</code> uses <code>unixodbc</code> library, that conflicts with <code>libiodbc2</code>. <code>libiodbc2</code>
+is a dependency for soprano, that is a dependency for the most of KDE applications.</p>
+
+<p>So, you cannot use the KDE and UnixODBC in Debian (the bug from 2011 year).</p>
+
+<p>This conflict can be fixed, downloading the patched versions of the packages from
+here:</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>http://packages.ubuntu.com/precise/libsoprano4
+</span><span class='line'>http://packages.ubuntu.com/precise/i386/soprano-daemon</span></code></pre></td></tr></table></div></figure>
+
+
+<p>If you don&#8217;t use KDE or the bug was fixed, skip this step.</p>
+
+<h2>Part 3</h2>
+
+<p>Update the config files:</p>
+
+<p>/etc/odbc.ini</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+<span class='line-number'>6</span>
+<span class='line-number'>7</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>[odbc-test]
+</span><span class='line'>Description = test
+</span><span class='line'>Driver = ms-sql
+</span><span class='line'>Servername = odbc-test
+</span><span class='line'>UID = test
+</span><span class='line'>Database = test_db
+</span><span class='line'>Port = 1433</span></code></pre></td></tr></table></div></figure>
+
+
+<p>/etc/odbcinst.ini</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+<span class='line-number'>6</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>[ms-sql]
+</span><span class='line'>Description = TDS connection
+</span><span class='line'>Driver = /usr/lib/i386-linux-gnu/odbc/libtdsodbc.so
+</span><span class='line'>Setup = /usr/lib/i386-linux-gnu/odbc/libtdsS.so
+</span><span class='line'>UsageCount = 1
+</span><span class='line'>FileUsage = 1</span></code></pre></td></tr></table></div></figure>
+
+
+<p>Test it:</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>$isql -v odbc-test test test
+</span><span class='line'>SQL&gt;</span></code></pre></td></tr></table></div></figure>
+
+
+<h2>Part 4</h2>
+
+<p>Try it from Erlang:</p>
+
+<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
+<span class='line-number'>2</span>
+<span class='line-number'>3</span>
+<span class='line-number'>4</span>
+<span class='line-number'>5</span>
+<span class='line-number'>6</span>
+</pre></td><td class='code'><pre><code class=''><span class='line'>1&gt; odbc:start().
+</span><span class='line'>ok
+</span><span class='line'>2&gt; {ok, S} = odbc:connect("DSN=odbc-test;UID=test;PWD=test", []).
+</span><span class='line'>{ok,&lt;0.44.0&gt;}
+</span><span class='line'>3&gt; odbc:sql_query(S, "SELECT 1").
+</span><span class='line'>{selected,[[]],[{1}]}</span></code></pre></td></tr></table></div></figure>
+
+
+
+</div>
+
+
+ <footer>
+ <p class="meta">
+
+
+
+<span class="byline author vcard">Posted by <span class="fn">Uvarov Michael</span></span>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<time datetime="2012-07-02T19:12:00+04:00" pubdate data-updated="true">Jul 2<span>nd</span>, 2012</time>
+
+
+<span class="categories">
+
+ <a class='category' href='/blog/categories/erlang/'>Erlang</a>, <a class='category' href='/blog/categories/odbc/'>ODBC</a>
+
+</span>
+
+
+ </p>
+
+ <div class="sharing">
+
+ <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://arcusfelis.github.com/blog/2012/07/02/odbc/" data-via="" data-counturl="http://arcusfelis.github.com/blog/2012/07/02/odbc/" >Tweet</a>
+
+
+
+</div>
+
+
+ <p class="meta">
+
+ <a class="basic-alignment left" href="/blog/2012/07/02/dialyzer/" title="Previous Post: Dialyzer">&laquo; Dialyzer</a>
+
+
+ <a class="basic-alignment right" href="/blog/2012/07/02/odbc-sql/" title="Next Post: ODBC, MS SQL Server and Erlang">ODBC, MS SQL Server and Erlang &raquo;</a>
+
+ </p>
+ </footer>
+</article>
+
+</div>
+
+<aside class="sidebar">
+
+ <section>
+ <h1>Recent Posts</h1>
+ <ul id="recent_posts">
+
+ <li class="post">
+ <a href="/blog/2012/07/02/odbc-sql/">ODBC, MS SQL Server and Erlang</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2012/07/02/odbc/">Install ODBC and MS SQL Server client for Erlang</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2012/07/02/dialyzer/">Dialyzer</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2012/06/15/pipes/">Pipes</a>
+ </li>
+
+ </ul>
+</section>
+
+
+
+
+
+
+
+</aside>
+
+
+ </div>
+ </div>
+ <footer role="contentinfo"><p>
+ Copyright &copy; 2012 - Uvarov Michael -
+ <span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
+</p>
+
+</footer>
+
+
+
+
+
+
+
+
+ <script type="text/javascript">
+ (function(){
+ var twitterWidgets = document.createElement('script');
+ twitterWidgets.type = 'text/javascript';
+ twitterWidgets.async = true;
+ twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
+ document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
+ })();
+ </script>
+
+
+
+
+
+</body>
+</html>
52 blog/archives/index.html
View
@@ -5,13 +5,13 @@
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
- <title>Blog Archive - freeakk.github.com</title>
+ <title>Blog Archive - arcusfelis.github.com</title>
<meta name="author" content="Uvarov Michael">
- <meta name="description" content=" Blog Archive 2012 Dialyzer
-Jul 02 2012 posted in Dialyzer, Erlang, Xapian Pipes
-Jun 15 2012 posted in Erlang, Xapian Recent Posts Dialyzer Pipes ">
+ <meta name="description" content="Blog Archive 2012 ODBC, MS SQL Server and Erlang
+Jul 02 2012 posted in Erlang, ODBC, datetime Install ODBC and MS SQL Server client for Erlang
+Jul &hellip;">
<!-- http://t.co/dKP3o1e -->
@@ -20,13 +20,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="canonical" href="http://freeakk.github.com/blog/archives">
+ <link rel="canonical" href="http://arcusfelis.github.com/blog/archives">
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="/javascripts/ender.js"></script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
- <link href="/atom.xml" rel="alternate" title="freeakk.github.com" type="application/atom+xml">
+ <link href="/atom.xml" rel="alternate" title="arcusfelis.github.com" type="application/atom+xml">
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
@@ -37,7 +37,7 @@
<body >
<header role="banner"><hgroup>
- <h1><a href="/">freeakk.github.com</a></h1>
+ <h1><a href="/">arcusfelis.github.com</a></h1>
</hgroup>
@@ -49,7 +49,7 @@
<form action="http://google.com/search" method="get">
<fieldset role="search">
- <input type="hidden" name="q" value="site:freeakk.github.com" />
+ <input type="hidden" name="q" value="site:arcusfelis.github.com" />
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
</fieldset>
</form>
@@ -80,6 +80,34 @@ <h1 class="entry-title">Blog Archive</h1>
<article>
+<h1><a href="/blog/2012/07/02/odbc-sql/">ODBC, MS SQL Server and Erlang</a></h1>
+<time datetime="2012-07-02T19:12:00+04:00" pubdate><span class='month'>Jul</span> <span class='day'>02</span> <span class='year'>2012</span></time>
+
+<footer>
+ <span class="categories">posted in <a class='category' href='/blog/categories/erlang/'>Erlang</a>, <a class='category' href='/blog/categories/odbc/'>ODBC</a>, <a class='category' href='/blog/categories/datetime/'>datetime</a></span>
+</footer>
+
+
+</article>
+
+
+
+<article>
+
+<h1><a href="/blog/2012/07/02/odbc/">Install ODBC and MS SQL Server client for Erlang</a></h1>
+<time datetime="2012-07-02T19:12:00+04:00" pubdate><span class='month'>Jul</span> <span class='day'>02</span> <span class='year'>2012</span></time>
+
+<footer>
+ <span class="categories">posted in <a class='category' href='/blog/categories/erlang/'>Erlang</a>, <a class='category' href='/blog/categories/odbc/'>ODBC</a></span>
+</footer>
+
+
+</article>
+
+
+
+<article>
+
<h1><a href="/blog/2012/07/02/dialyzer/">Dialyzer</a></h1>
<time datetime="2012-07-02T19:12:00+04:00" pubdate><span class='month'>Jul</span> <span class='day'>02</span> <span class='year'>2012</span></time>
@@ -118,6 +146,14 @@ <h1 class="entry-title">Blog Archive</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/blog/2012/07/02/odbc-sql/">ODBC, MS SQL Server and Erlang</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2012/07/02/odbc/">Install ODBC and MS SQL Server client for Erlang</a>
+ </li>
+
+ <li class="post">
<a href="/blog/2012/07/02/dialyzer/">Dialyzer</a>
</li>
37 blog/categories/datetime/atom.xml
View
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+
+ <title><![CDATA[Category: datetime | arcusfelis.github.com]]></title>
+ <link href="http://arcusfelis.github.com/blog/categories/datetime/atom.xml" rel="self"/>
+ <link href="http://arcusfelis.github.com/"/>
+ <updated>2012-12-14T14:45:35+04:00</updated>
+ <id>http://arcusfelis.github.com/</id>
+ <author>
+ <name><![CDATA[Uvarov Michael]]></name>
+
+ </author>
+ <generator uri="http://octopress.org/">Octopress</generator>
+
+
+ <entry>
+ <title type="html"><![CDATA[ODBC, MS SQL Server and Erlang]]></title>
+ <link href="http://arcusfelis.github.com/blog/2012/07/02/odbc-sql/"/>
+ <updated>2012-07-02T19:12:00+04:00</updated>
+ <id>http://arcusfelis.github.com/blog/2012/07/02/odbc-sql</id>
+ <content type="html"><![CDATA[<h2>Date and time</h2>
+
+<p><code>
+odbc:sql_query(S, "SELECT {fn CURDATE()}").
+{selected,[[]],[{"2012-10-02"}]}
+</code></p>
+
+<p><code>
+odbc:sql_query(S, "SELECT getdate()").
+{selected,[[]],[{ { {2012,10,23},{2,6,37} } }]}
+</code></p>
+
+<p><code>{ {2012,10,23},{2,6,37} }</code> has a type <code>sql_datetime</code>.</p>
+]]></content>
+ </entry>
+
+</feed>
163 blog/categories/datetime/index.html
View
@@ -0,0 +1,163 @@
+
+<!DOCTYPE html>
+<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
+<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
+<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
+<head>
+ <meta charset="utf-8">
+ <title>Category: datetime - arcusfelis.github.com</title>
+ <meta name="author" content="Uvarov Michael">
+
+
+ <meta name="description" content="Category: datetime">
+
+
+ <!-- http://t.co/dKP3o1e -->
+ <meta name="HandheldFriendly" content="True">
+ <meta name="MobileOptimized" content="320">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+
+
+ <link rel="canonical" href="http://arcusfelis.github.comblog/categories/datetime">
+ <link href="/favicon.png" rel="icon">
+ <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
+ <script src="/javascripts/modernizr-2.0.js"></script>
+ <script src="/javascripts/ender.js"></script>
+ <script src="/javascripts/octopress.js" type="text/javascript"></script>
+ <link href="/atom.xml" rel="alternate" title="arcusfelis.github.com" type="application/atom+xml">
+ <!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
+<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
+<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
+
+
+
+</head>
+
+<body >
+ <header role="banner"><hgroup>
+ <h1><a href="/">arcusfelis.github.com</a></h1>
+
+</hgroup>
+
+</header>
+ <nav role="navigation"><ul class="subscription" data-subscription="rss">
+ <li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
+
+</ul>
+
+<form action="http://google.com/search" method="get">
+ <fieldset role="search">
+ <input type="hidden" name="q" value="site:arcusfelis.github.com" />
+ <input class="search" type="text" name="q" results="0" placeholder="Search"/>
+ </fieldset>
+</form>
+
+<ul class="main-navigation">
+ <li><a href="/">Blog</a></li>
+ <li><a href="/blog/archives">Archives</a></li>
+ <li><a href="/about">About me</a></li>
+</ul>
+
+</nav>
+ <div id="main">
+ <div id="content">
+ <div>
+<article role="article">
+
+ <header>
+ <h1 class="entry-title">Category: Datetime</h1>
+
+ </header>
+
+ <div id="blog-archives" class="category">
+
+
+
+
+ <h2>2012</h2>
+
+<article>
+
+<h1><a href="/blog/2012/07/02/odbc-sql/">ODBC, MS SQL Server and Erlang</a></h1>
+<time datetime="2012-07-02T19:12:00+04:00" pubdate><span class='month'>Jul</span> <span class='day'>02</span> <span class='year'>2012</span></time>
+
+<footer>
+ <span class="categories">posted in <a class='category' href='/blog/categories/erlang/'>Erlang</a>, <a class='category' href='/blog/categories/odbc/'>ODBC</a>, <a class='category' href='/blog/categories/datetime/'>datetime</a></span>
+</footer>
+
+
+</article>
+
+</div>
+
+
+</article>
+
+</div>
+
+<aside class="sidebar">
+
+ <section>
+ <h1>Recent Posts</h1>
+ <ul id="recent_posts">
+
+ <li class="post">
+ <a href="/blog/2012/07/02/odbc-sql/">ODBC, MS SQL Server and Erlang</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2012/07/02/odbc/">Install ODBC and MS SQL Server client for Erlang</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2012/07/02/dialyzer/">Dialyzer</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2012/06/15/pipes/">Pipes</a>
+ </li>
+
+ </ul>
+</section>
+
+
+
+
+
+
+
+</aside>
+
+
+ </div>
+ </div>
+ <footer role="contentinfo"><p>
+ Copyright &copy; 2012 - Uvarov Michael -
+ <span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
+</p>
+
+</footer>
+
+
+
+
+
+
+
+
+ <script type="text/javascript">
+ (function(){
+ var twitterWidgets = document.createElement('script');
+ twitterWidgets.type = 'text/javascript';
+ twitterWidgets.async = true;
+ twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
+ document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
+ })();
+ </script>
+
+
+
+
+
+</body>
+</html>
14 blog/categories/dialyzer/atom.xml
View
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
- <title><![CDATA[Category: Dialyzer | freeakk.github.com]]></title>
- <link href="http://freeakk.github.com/blog/categories/dialyzer/atom.xml" rel="self"/>
- <link href="http://freeakk.github.com/"/>
- <updated>2012-08-27T21:35:04+04:00</updated>
- <id>http://freeakk.github.com/</id>
+ <title><![CDATA[Category: Dialyzer | arcusfelis.github.com]]></title>
+ <link href="http://arcusfelis.github.com/blog/categories/dialyzer/atom.xml" rel="self"/>
+ <link href="http://arcusfelis.github.com/"/>
+ <updated>2012-12-14T14:45:35+04:00</updated>
+ <id>http://arcusfelis.github.com/</id>
<author>
<name><![CDATA[Uvarov Michael]]></name>
@@ -15,9 +15,9 @@
<entry>
<title type="html"><![CDATA[Dialyzer]]></title>
- <link href="http://freeakk.github.com/blog/2012/07/02/dialyzer/"/>
+ <link href="http://arcusfelis.github.com/blog/2012/07/02/dialyzer/"/>
<updated>2012-07-02T19:12:00+04:00</updated>
- <id>http://freeakk.github.com/blog/2012/07/02/dialyzer</id>
+ <id>http://arcusfelis.github.com/blog/2012/07/02/dialyzer</id>
<content type="html"><![CDATA[<p>Dializer is a static analysis tool.
It uses Persistent Lookup Table for storing information.
First of all, we need to build PLT:</p>
18 blog/categories/dialyzer/index.html
View
@@ -5,7 +5,7 @@
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
- <title>Category: Dialyzer - freeakk.github.com</title>
+ <title>Category: Dialyzer - arcusfelis.github.com</title>
<meta name="author" content="Uvarov Michael">
@@ -18,13 +18,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="canonical" href="http://freeakk.github.comblog/categories/dialyzer">
+ <link rel="canonical" href="http://arcusfelis.github.comblog/categories/dialyzer">
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="/javascripts/ender.js"></script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
- <link href="/atom.xml" rel="alternate" title="freeakk.github.com" type="application/atom+xml">
+ <link href="/atom.xml" rel="alternate" title="arcusfelis.github.com" type="application/atom+xml">
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
@@ -35,7 +35,7 @@
<body >
<header role="banner"><hgroup>
- <h1><a href="/">freeakk.github.com</a></h1>
+ <h1><a href="/">arcusfelis.github.com</a></h1>
</hgroup>
@@ -47,7 +47,7 @@
<form action="http://google.com/search" method="get">
<fieldset role="search">
- <input type="hidden" name="q" value="site:freeakk.github.com" />
+ <input type="hidden" name="q" value="site:arcusfelis.github.com" />
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
</fieldset>
</form>
@@ -102,6 +102,14 @@ <h1 class="entry-title">Category: Dialyzer</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/blog/2012/07/02/odbc-sql/">ODBC, MS SQL Server and Erlang</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2012/07/02/odbc/">Install ODBC and MS SQL Server client for Erlang</a>
+ </li>
+
+ <li class="post">
<a href="/blog/2012/07/02/dialyzer/">Dialyzer</a>
</li>
152 blog/categories/erlang/atom.xml
View
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
- <title><![CDATA[Category: Erlang | freeakk.github.com]]></title>
- <link href="http://freeakk.github.com/blog/categories/erlang/atom.xml" rel="self"/>
- <link href="http://freeakk.github.com/"/>
- <updated>2012-08-27T21:35:04+04:00</updated>
- <id>http://freeakk.github.com/</id>
+ <title><![CDATA[Category: Erlang | arcusfelis.github.com]]></title>
+ <link href="http://arcusfelis.github.com/blog/categories/erlang/atom.xml" rel="self"/>
+ <link href="http://arcusfelis.github.com/"/>
+ <updated>2012-12-14T14:45:35+04:00</updated>
+ <id>http://arcusfelis.github.com/</id>
<author>
<name><![CDATA[Uvarov Michael]]></name>
@@ -14,10 +14,144 @@
<entry>
+ <title type="html"><![CDATA[ODBC, MS SQL Server and Erlang]]></title>
+ <link href="http://arcusfelis.github.com/blog/2012/07/02/odbc-sql/"/>
+ <updated>2012-07-02T19:12:00+04:00</updated>
+ <id>http://arcusfelis.github.com/blog/2012/07/02/odbc-sql</id>
+ <content type="html"><![CDATA[<h2>Date and time</h2>
+
+<p><code>
+odbc:sql_query(S, "SELECT {fn CURDATE()}").
+{selected,[[]],[{"2012-10-02"}]}
+</code></p>
+
+<p><code>
+odbc:sql_query(S, "SELECT getdate()").
+{selected,[[]],[{ { {2012,10,23},{2,6,37} } }]}
+</code></p>
+
+<p><code>{ {2012,10,23},{2,6,37} }</code> has a type <code>sql_datetime</code>.</p>
+]]></content>
+ </entry>
+
+ <entry>
+ <title type="html"><![CDATA[Install ODBC and MS SQL Server client for Erlang]]></title>
+ <link href="http://arcusfelis.github.com/blog/2012/07/02/odbc/"/>
+ <updated>2012-07-02T19:12:00+04:00</updated>
+ <id>http://arcusfelis.github.com/blog/2012/07/02/odbc</id>
+ <content type="html"><![CDATA[<p>Here we are connecting to MS SQL Server 2008 on MS Windows XP from Erlang on Debian Linux.</p>
+
+<h2>Part 1</h2>
+
+<p>Install utilities (FreeTDS SQL client):</p>
+
+<p>```</p>
+
+<h1>apt-get freetds-bin freetds-dev</h1>
+
+<p>```</p>
+
+<p>Try to connect with the <code>tsql</code> command from the <code>freetds-bin</code> package:</p>
+
+<p><code>
+tsql -H %ip_address_or_hostname% -p %port_number% -U %username% -P %password%
+</code></p>
+
+<p>or (with actual values for me):</p>
+
+<p>```
+$ tsql -H PI -p 1433 -U test -P test
+locale is "en_US.UTF-8"
+locale charset is "UTF-8"
+using default charset "UTF-8"
+1></p>
+
+<p>```</p>
+
+<p>If you see the counter (1, 2, 3, ...), most likely tsql is unable to connect to
+the indicated server. Check the firewall's settings.</p>
+
+<p><code>sqsh</code> is an alternative for <code>tsql</code> (more powerful).</p>
+
+<h2>Part 2</h2>
+
+<p>Install the ODBC client driver.</p>
+
+<p><code>
+apt-get install tdsodbc
+</code></p>
+
+<h2>Problems? Part 2a</h2>
+
+<p><code>tdsodbc</code> uses <code>unixodbc</code> library, that conflicts with <code>libiodbc2</code>. <code>libiodbc2</code>
+is a dependency for soprano, that is a dependency for the most of KDE applications.</p>
+
+<p>So, you cannot use the KDE and UnixODBC in Debian (the bug from 2011 year).</p>
+
+<p>This conflict can be fixed, downloading the patched versions of the packages from
+here:</p>
+
+<p><code>
+http://packages.ubuntu.com/precise/libsoprano4
+http://packages.ubuntu.com/precise/i386/soprano-daemon
+</code></p>
+
+<p>If you don't use KDE or the bug was fixed, skip this step.</p>
+
+<h2>Part 3</h2>
+
+<p>Update the config files:</p>
+
+<p>/etc/odbc.ini</p>
+
+<p><code>
+[odbc-test]
+Description = test
+Driver = ms-sql
+Servername = odbc-test
+UID = test
+Database = test_db
+Port = 1433
+</code></p>
+
+<p>/etc/odbcinst.ini</p>
+
+<p><code>
+[ms-sql]
+Description = TDS connection
+Driver = /usr/lib/i386-linux-gnu/odbc/libtdsodbc.so
+Setup = /usr/lib/i386-linux-gnu/odbc/libtdsS.so
+UsageCount = 1
+FileUsage = 1
+</code></p>
+
+<p>Test it:</p>
+
+<p><code>
+$isql -v odbc-test test test
+SQL&gt;
+</code></p>
+
+<h2>Part 4</h2>
+
+<p>Try it from Erlang:</p>
+
+<p><code>
+1&gt; odbc:start().
+ok
+2&gt; {ok, S} = odbc:connect("DSN=odbc-test;UID=test;PWD=test", []).
+{ok,&lt;0.44.0&gt;}
+3&gt; odbc:sql_query(S, "SELECT 1").
+{selected,[[]],[{1}]}
+</code></p>
+]]></content>
+ </entry>
+
+ <entry>
<title type="html"><![CDATA[Dialyzer]]></title>
- <link href="http://freeakk.github.com/blog/2012/07/02/dialyzer/"/>
+ <link href="http://arcusfelis.github.com/blog/2012/07/02/dialyzer/"/>
<updated>2012-07-02T19:12:00+04:00</updated>
- <id>http://freeakk.github.com/blog/2012/07/02/dialyzer</id>
+ <id>http://arcusfelis.github.com/blog/2012/07/02/dialyzer</id>
<content type="html"><![CDATA[<p>Dializer is a static analysis tool.
It uses Persistent Lookup Table for storing information.
First of all, we need to build PLT:</p>
@@ -69,9 +203,9 @@ compilation time but it may result in (much) longer analysis time.</li>
<entry>
<title type="html"><![CDATA[Pipes]]></title>
- <link href="http://freeakk.github.com/blog/2012/06/15/pipes/"/>
+ <link href="http://arcusfelis.github.com/blog/2012/06/15/pipes/"/>
<updated>2012-06-15T18:23:00+04:00</updated>
- <id>http://freeakk.github.com/blog/2012/06/15/pipes</id>
+ <id>http://arcusfelis.github.com/blog/2012/06/15/pipes</id>
<content type="html"><![CDATA[<h1>Using Xapian through a pipe</h1>
<p>To avoid linking with Xapian you can use a port:</p>
46 blog/categories/erlang/index.html
View
@@ -5,7 +5,7 @@
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
- <title>Category: Erlang - freeakk.github.com</title>
+ <title>Category: Erlang - arcusfelis.github.com</title>
<meta name="author" content="Uvarov Michael">
@@ -18,13 +18,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="canonical" href="http://freeakk.github.comblog/categories/erlang">
+ <link rel="canonical" href="http://arcusfelis.github.comblog/categories/erlang">
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="/javascripts/ender.js"></script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
- <link href="/atom.xml" rel="alternate" title="freeakk.github.com" type="application/atom+xml">
+ <link href="/atom.xml" rel="alternate" title="arcusfelis.github.com" type="application/atom+xml">
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
@@ -35,7 +35,7 @@
<body >
<header role="banner"><hgroup>
- <h1><a href="/">freeakk.github.com</a></h1>
+ <h1><a href="/">arcusfelis.github.com</a></h1>
</hgroup>
@@ -47,7 +47,7 @@
<form action="http://google.com/search" method="get">
<fieldset role="search">
- <input type="hidden" name="q" value="site:freeakk.github.com" />
+ <input type="hidden" name="q" value="site:arcusfelis.github.com" />
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
</fieldset>
</form>
@@ -78,6 +78,34 @@ <h1 class="entry-title">Category: Erlang</h1>
<article>
+<h1><a href="/blog/2012/07/02/odbc-sql/">ODBC, MS SQL Server and Erlang</a></h1>
+<time datetime="2012-07-02T19:12:00+04:00" pubdate><span class='month'>Jul</span> <span class='day'>02</span> <span class='year'>2012</span></time>
+
+<footer>
+ <span class="categories">posted in <a class='category' href='/blog/categories/erlang/'>Erlang</a>, <a class='category' href='/blog/categories/odbc/'>ODBC</a>, <a class='category' href='/blog/categories/datetime/'>datetime</a></span>
+</footer>
+
+
+</article>
+
+
+
+<article>
+
+<h1><a href="/blog/2012/07/02/odbc/">Install ODBC and MS SQL Server client for Erlang</a></h1>
+<time datetime="2012-07-02T19:12:00+04:00" pubdate><span class='month'>Jul</span> <span class='day'>02</span> <span class='year'>2012</span></time>
+
+<footer>
+ <span class="categories">posted in <a class='category' href='/blog/categories/erlang/'>Erlang</a>, <a class='category' href='/blog/categories/odbc/'>ODBC</a></span>
+</footer>
+
+
+</article>
+
+
+
+<article>
+
<h1><a href="/blog/2012/07/02/dialyzer/">Dialyzer</a></h1>
<time datetime="2012-07-02T19:12:00+04:00" pubdate><span class='month'>Jul</span> <span class='day'>02</span> <span class='year'>2012</span></time>
@@ -116,6 +144,14 @@ <h1 class="entry-title">Category: Erlang</h1>
<ul id="recent_posts">
<li class="post">
+ <a href="/blog/2012/07/02/odbc-sql/">ODBC, MS SQL Server and Erlang</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2012/07/02/odbc/">Install ODBC and MS SQL Server client for Erlang</a>
+ </li>
+
+ <li class="post">
<a href="/blog/2012/07/02/dialyzer/">Dialyzer</a>
</li>
150 blog/categories/odbc/atom.xml
View
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+
+ <title><![CDATA[Category: ODBC | arcusfelis.github.com]]></title>
+ <link href="http://arcusfelis.github.com/blog/categories/odbc/atom.xml" rel="self"/>
+ <link href="http://arcusfelis.github.com/"/>
+ <updated>2012-12-14T14:45:35+04:00</updated>
+ <id>http://arcusfelis.github.com/</id>
+ <author>
+ <name><![CDATA[Uvarov Michael]]></name>
+
+ </author>
+ <generator uri="http://octopress.org/">Octopress</generator>
+
+
+ <entry>
+ <title type="html"><![CDATA[ODBC, MS SQL Server and Erlang]]></title>
+ <link href="http://arcusfelis.github.com/blog/2012/07/02/odbc-sql/"/>
+ <updated>2012-07-02T19:12:00+04:00</updated>
+ <id>http://arcusfelis.github.com/blog/2012/07/02/odbc-sql</id>
+ <content type="html"><![CDATA[<h2>Date and time</h2>
+
+<p><code>
+odbc:sql_query(S, "SELECT {fn CURDATE()}").
+{selected,[[]],[{"2012-10-02"}]}
+</code></p>
+
+<p><code>
+odbc:sql_query(S, "SELECT getdate()").
+{selected,[[]],[{ { {2012,10,23},{2,6,37} } }]}
+</code></p>
+
+<p><code>{ {2012,10,23},{2,6,37} }</code> has a type <code>sql_datetime</code>.</p>
+]]></content>
+ </entry>
+
+ <entry>
+ <title type="html"><![CDATA[Install ODBC and MS SQL Server client for Erlang]]></title>
+ <link href="http://arcusfelis.github.com/blog/2012/07/02/odbc/"/>
+ <updated>2012-07-02T19:12:00+04:00</updated>
+ <id>http://arcusfelis.github.com/blog/2012/07/02/odbc</id>
+ <content type="html"><![CDATA[<p>Here we are connecting to MS SQL Server 2008 on MS Windows XP from Erlang on Debian Linux.</p>
+
+<h2>Part 1</h2>
+
+<p>Install utilities (FreeTDS SQL client):</p>
+
+<p>```</p>
+
+<h1>apt-get freetds-bin freetds-dev</h1>
+
+<p>```</p>
+
+<p>Try to connect with the <code>tsql</code> command from the <code>freetds-bin</code> package:</p>
+
+<p><code>
+tsql -H %ip_address_or_hostname% -p %port_number% -U %username% -P %password%
+</code></p>
+
+<p>or (with actual values for me):</p>
+
+<p>```
+$ tsql -H PI -p 1433 -U test -P test
+locale is "en_US.UTF-8"
+locale charset is "UTF-8"
+using default charset "UTF-8"
+1></p>
+
+<p>```</p>
+
+<p>If you see the counter (1, 2, 3, ...), most likely tsql is unable to connect to
+the indicated server. Check the firewall's settings.</p>
+
+<p><code>sqsh</code> is an alternative for <code>tsql</code> (more powerful).</p>
+
+<h2>Part 2</h2>
+
+<p>Install the ODBC client driver.</p>
+
+<p><code>
+apt-get install tdsodbc
+</code></p>
+
+<h2>Problems? Part 2a</h2>
+
+<p><code>tdsodbc</code> uses <code>unixodbc</code> library, that conflicts with <code>libiodbc2</code>. <code>libiodbc2</code>
+is a dependency for soprano, that is a dependency for the most of KDE applications.</p>
+
+<p>So, you cannot use the KDE and UnixODBC in Debian (the bug from 2011 year).</p>
+
+<p>This conflict can be fixed, downloading the patched versions of the packages from
+here:</p>
+
+<p><code>
+http://packages.ubuntu.com/precise/libsoprano4
+http://packages.ubuntu.com/precise/i386/soprano-daemon
+</code></p>
+
+<p>If you don't use KDE or the bug was fixed, skip this step.</p>
+
+<h2>Part 3</h2>
+
+<p>Update the config files:</p>
+
+<p>/etc/odbc.ini</p>
+
+<p><code>
+[odbc-test]
+Description = test
+Driver = ms-sql
+Servername = odbc-test
+UID = test
+Database = test_db
+Port = 1433
+</code></p>
+
+<p>/etc/odbcinst.ini</p>
+
+<p><code>
+[ms-sql]
+Description = TDS connection
+Driver = /usr/lib/i386-linux-gnu/odbc/libtdsodbc.so
+Setup = /usr/lib/i386-linux-gnu/odbc/libtdsS.so
+UsageCount = 1
+FileUsage = 1
+</code></p>
+
+<p>Test it:</p>
+
+<p><code>
+$isql -v odbc-test test test
+SQL&gt;
+</code></p>
+
+<h2>Part 4</h2>
+
+<p>Try it from Erlang:</p>
+
+<p><code>
+1&gt; odbc:start().
+ok
+2&gt; {ok, S} = odbc:connect("DSN=odbc-test;UID=test;PWD=test", []).
+{ok,&lt;0.44.0&gt;}
+3&gt; odbc:sql_query(S, "SELECT 1").
+{selected,[[]],[{1}]}
+</code></p>
+]]></content>
+ </entry>
+
+</feed>
177 blog/categories/odbc/index.html
View
@@ -0,0 +1,177 @@
+
+<!DOCTYPE html>
+<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
+<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
+<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
+<head>
+ <meta charset="utf-8">
+ <title>Category: ODBC - arcusfelis.github.com</title>
+ <meta name="author" content="Uvarov Michael">
+
+
+ <meta name="description" content="Category: ODBC">
+
+
+ <!-- http://t.co/dKP3o1e -->
+ <meta name="HandheldFriendly" content="True">
+ <meta name="MobileOptimized" content="320">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+
+
+ <link rel="canonical" href="http://arcusfelis.github.comblog/categories/odbc">
+ <link href="/favicon.png" rel="icon">
+ <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
+ <script src="/javascripts/modernizr-2.0.js"></script>
+ <script src="/javascripts/ender.js"></script>
+ <script src="/javascripts/octopress.js" type="text/javascript"></script>
+ <link href="/atom.xml" rel="alternate" title="arcusfelis.github.com" type="application/atom+xml">
+ <!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
+<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
+<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
+
+
+
+</head>
+
+<body >
+ <header role="banner"><hgroup>
+ <h1><a href="/">arcusfelis.github.com</a></h1>
+
+</hgroup>
+
+</header>
+ <nav role="navigation"><ul class="subscription" data-subscription="rss">
+ <li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
+
+</ul>
+
+<form action="http://google.com/search" method="get">
+ <fieldset role="search">
+ <input type="hidden" name="q" value="site:arcusfelis.github.com" />
+ <input class="search" type="text" name="q" results="0" placeholder="Search"/>
+ </fieldset>
+</form>
+
+<ul class="main-navigation">
+ <li><a href="/">Blog</a></li>
+ <li><a href="/blog/archives">Archives</a></li>
+ <li><a href="/about">About me</a></li>
+</ul>
+
+</nav>
+ <div id="main">
+ <div id="content">
+ <div>
+<article role="article">
+
+ <header>
+ <h1 class="entry-title">Category: ODBC</h1>
+
+ </header>
+
+ <div id="blog-archives" class="category">
+
+
+
+
+ <h2>2012</h2>
+
+<article>
+
+<h1><a href="/blog/2012/07/02/odbc-sql/">ODBC, MS SQL Server and Erlang</a></h1>
+<time datetime="2012-07-02T19:12:00+04:00" pubdate><span class='month'>Jul</span> <span class='day'>02</span> <span class='year'>2012</span></time>
+
+<footer>
+ <span class="categories">posted in <a class='category' href='/blog/categories/erlang/'>Erlang</a>, <a class='category' href='/blog/categories/odbc/'>ODBC</a>, <a class='category' href='/blog/categories/datetime/'>datetime</a></span>
+</footer>
+
+
+</article>
+
+
+
+<article>
+
+<h1><a href="/blog/2012/07/02/odbc/">Install ODBC and MS SQL Server client for Erlang</a></h1>
+<time datetime="2012-07-02T19:12:00+04:00" pubdate><span class='month'>Jul</span> <span class='day'>02</span> <span class='year'>2012</span></time>
+
+<footer>
+ <span class="categories">posted in <a class='category' href='/blog/categories/erlang/'>Erlang</a>, <a class='category' href='/blog/categories/odbc/'>ODBC</a></span>
+</footer>
+
+
+</article>
+
+</div>
+
+
+</article>
+
+</div>
+
+<aside class="sidebar">
+
+ <section>
+ <h1>Recent Posts</h1>
+ <ul id="recent_posts">
+
+ <li class="post">
+ <a href="/blog/2012/07/02/odbc-sql/">ODBC, MS SQL Server and Erlang</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2012/07/02/odbc/">Install ODBC and MS SQL Server client for Erlang</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2012/07/02/dialyzer/">Dialyzer</a>
+ </li>
+
+ <li class="post">
+ <a href="/blog/2012/06/15/pipes/">Pipes</a>
+ </li>
+
+ </ul>
+</section>
+
+
+
+
+
+
+
+</aside>
+
+
+ </div>
+ </div>
+ <footer role="contentinfo"><p>
+ Copyright &copy; 2012 - Uvarov Michael -
+ <span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
+</p>
+
+</footer>
+
+
+
+
+
+
+
+
+ <script type="text/javascript">
+ (function(){
+ var twitterWidgets = document.createElement('script');
+ twitterWidgets.type = 'text/javascript';
+ twitterWidgets.async = true;
+ twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
+ document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
+ })();
+ </script>
+
+
+
+
+
+</body>
+</html>
18 blog/categories/xapian/atom.xml
View
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
- <title><![CDATA[Category: Xapian | freeakk.github.com]]></title>
- <link href="http://freeakk.github.com/blog/categories/xapian/atom.xml" rel="self"/>
- <link href="http://freeakk.github.com/"/>
- <updated>2012-08-27T21:35:04+04:00</updated>
- <id>http://freeakk.github.com/</id>
+ <title><![CDATA[Category: Xapian | arcusfelis.github.com]]></title>
+ <link href="http://arcusfelis.github.com/blog/categories/xapian/atom.xml" rel="self"/>
+ <link href="http://arcusfelis.github.com/"/>
+ <updated>2012-12-14T14:45:35+04:00</updated>
+ <id>http://arcusfelis.github.com/</id>
<author>
<name><![CDATA[Uvarov Michael]]></name>
@@ -15,9 +15,9 @@
<entry>
<title type="html"><![CDATA[Dialyzer]]></title>
- <link href="http://freeakk.github.com/blog/2012/07/02/dialyzer/"/>
+ <link href="http://arcusfelis.github.com/blog/2012/07/02/dialyzer/"/>
<updated>2012-07-02T19:12:00+04:00</updated>
- <id>http://freeakk.github.com/blog/2012/07/02/dialyzer</id>
+ <id>http://arcusfelis.github.com/blog/2012/07/02/dialyzer</id>
<content type="html"><![CDATA[<p>Dializer is a static analysis tool.
It uses Persistent Lookup Table for storing information.
First of all, we need to build PLT:</p>
@@ -69,9 +69,9 @@ compilation time but it may result in (much) longer analysis time.</li>
<entry>
<title type="html"><![CDATA[Pipes]]></title>
- <link href="http://freeakk.github.com/blog/2012/06/15/pipes/"/>
+ <link href="http://arcusfelis.github.com/blog/2012/06/15/pipes/"/>
<updated>2012-06-15T18:23:00+04:00</updated>
- <id>http://freeakk.github.com/blog/2012/06/15/pipes</id>
+ <id>http://arcusfelis.github.com/blog/2012/06/15/pipes</id>
<content type="html"><![CDATA[<h1>Using Xapian through a pipe</h1>