<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
    <channel>
        <title>CUBRID APIs Wiki</title>
        <link>http://www.cubrid.org/?mid=wiki_apis</link>
        <description>CUBRID APIs Wiki</description>
        <language>en</language>
        <pubDate>Mon, 30 May 2011 12:46:05 -0800</pubDate>
        <lastBuildDate>Thu, 23 May 2013 22:38:15 -0800</lastBuildDate>
        <generator>XpressEngine 1.4.4.1</generator>
                        										        <item>
            <title>CUBRID ODBC Driver Release Notes</title>
            <dc:creator>Laura Oh</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-odbc-driver-release-notes</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-odbc-driver-release-notes</guid>
                                    <description><![CDATA[<h1>CUBRID ODBC Driver 9.1.0.p1 Release Note(2013-05-06)</h1>
<ul>
<li>Download: <a href="http://ftp.cubrid.org/CUBRID_Drivers/ODBC_Driver/">http://ftp.cubrid.org/CUBRID_Drivers/ODBC_Driver/</a></li>
</ul>
<h1></h1>
<h3 style="width: 670px; margin: 10px 0px; font-size: 16px; font-family: Calibri, 'Times New Roman', Tahoma, sans-serif;"></h3>
<h3 style="width: 670px; margin: 10px 0px; font-size: 16px; font-family: Calibri, 'Times New Roman', Tahoma, sans-serif;">Changed and Enhanced Features:</h3>
<ul style="color: #131212; font-family: Calibri, 'Times New Roman', Arial, Tahoma; line-height: 20px; font-size: 15px; font-weight: normal;">
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-184" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-184" style="color: #3b5999 !important; text-decoration: none;">APIS-184</a>&nbsp;-&nbsp;ODBC]&nbsp;how to do auto_commit off in C#</li>
</ul>
<p style="line-height: 20px; font-family: Calibri, 'Times New Roman', Arial, Tahoma; font-size: 15px; margin: 7px 0px; text-align: justify; color: #131212; font-weight: normal;">&nbsp;</p>
<h3 style="width: 670px; margin: 10px 0px; font-size: 16px; font-family: Calibri, 'Times New Roman', Tahoma, sans-serif;">Fixed bugs:</h3>
<ul style="color: #131212; font-family: Calibri, 'Times New Roman', Arial, Tahoma; line-height: 20px; font-size: 15px; font-weight: normal;">
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-152" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-152" style="color: #3b5999 !important; text-decoration: none;">APIS-152</a>&nbsp;-&nbsp;ODBC] Error when executing a query in Korean</li>
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-155" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-155" style="color: #3b5999 !important; text-decoration: none;">APIS-155</a>&nbsp;- Run time error when selecting in CUBRID ODBC Driver</li>
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-156" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-156" style="color: #3b5999 !important; text-decoration: none;">APIS-156</a>&nbsp;- user reported&gt; ODBC driver has a Fetch error</li>
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-443" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-443" style="color: #3b5999 !important; text-decoration: none;">APIS-443</a>&nbsp;- Fetch error in using openrowset() call in sql server</li>
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-445" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-445" style="color: #3b5999 !important; text-decoration: none;">APIS-445</a>&nbsp;- sql server core dump if openrowset() call on numeric field from ODBC driver</li>
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-536" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-536" style="color: #3b5999 !important; text-decoration: none;">APIS-536</a>&nbsp;-&nbsp;ODBC]&nbsp;The returned value of OdbcConnection.Database is incorrect</li>
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-538" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-538" style="color: #3b5999 !important; text-decoration: none;">APIS-538</a>&nbsp;-&nbsp;ODBC]&nbsp;A problem of the returned value of OdbcConnection.DataSource property</li>
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-539" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-539" style="color: #3b5999 !important; text-decoration: none;">APIS-539</a>&nbsp;-&nbsp;ODBC]&nbsp;OdbcDataReader.GetDataTypeName doesn't work</li>
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-540" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-540" style="color: #3b5999 !important; text-decoration: none;">APIS-540</a>&nbsp;-&nbsp;ODBC]&nbsp;OdbcDataReader GetInt16, GetInt32 doesn't returns expected exception when read an overbound integer</li>
</ul>
<p>&nbsp;</p>
<h1>CUBRID ODBC Driver 9.1.0 Release Note</h1>
<h3>Functionality added or changed:</h3>
<p>The following ODBC APIs are newly supported by CUBRID ODBC:</p>
<ul>
<li>SQLPrimaryKeys</li>
<li>SQLForeignKeys</li>
<li>SQLProcedures</li>
<li>SQLProcedureColumns</li>
<li>SQLTablePrivileges</li>
</ul>
<p>All four functions are catalog functions, which can get schema information of database you connect to.  CUBRID schema information is stored in system catalog table, so you can also get this information from system catalog virtual table using SQL statement.</p>
<p>Database schema information is important for data modeling tools like <b>CA ERwin Data Modeler</b>, which enables you to visualize complex data structures.  It uses schema information, for example, tables of database, columns and attributes of table, the primary and foreign keys of table, and relationships between tables and so on, to get the structure of the database.</p>
<p>&nbsp;</p>
<ol>
<li>SQLPrimaryKeys returns the column names that make up the primary key for a table.</li>
<li>SQLForeignKeys can return:<ol>
<li>A list of foreign keys in the specified table (columns in the specified table that refer to primary keys in other tables).</li>
<li>A list of foreign keys in other tables that refer to the primary key in the specified table.</li>
</ol></li>
<li>SQLProcedures returns returns the list of function/procedure names stored in a specific data source.<ol>
<li>Stored functions/procedures are blocks of code that have a flow of commands for data manipulation and are easy to     manipulate and administer. CUBRID supports to develop stored functions and procedures in Java. Java stored     functions/procedures are executed on the JVM (Java Virtual Machine) hosted by CUBRID.</li>
</ol></li>
<li>SQLProcedureColumns returns the list of input and output parameters for the specified procedures, but not including     the return columns.</li>
<li>SQLTablePrivileges returns a list of tables and the privileges associated with each table, which represents     authorization information of the classes for which the current user has authorization in the database.</li>
</ol>
<p>&nbsp;</p>
<h3>Fixed bugs:</h3>
<ul>
<li>SQLFetchScroll: When parameter FetchOrientation is SQL_FETCH_LAST, SQLFetchScroll should return the last complete     rowset in the result set. But it will return the first, not the last.    
<ul>
<li>SQLFetchScroll is used to fetches the specified rowset of data from the result set and returns data for all bound     columns. Rowsets can be specified at an absolute or relative position or by bookmark.</li>
</ul>
</li>
<li>SQLSetPos: Application will crash when calling SQLSetPos.    
<ul>
<li>SQLSetPos sets the cursor position in a rowset and allows an application to refresh, update or delete data in the     result set.</li>
</ul>
</li>
<li>SQLSetPos: The default value of statement attribute SQL_ATTR_ROW_ARRAY_SIZE is 1, which is the number of rows     returned by each call to SQLFetch or SQLFetchScroll. If we set this attribute to value that is more than 1, SQLSetPos     can't work correctly.</li>
<li>SQLStatistics and SQLSpecialColumns: The results of the two catalog functions are not valid.<br /><br />SQLStatistics retrieves a list of statistics about a single table and the indexes associated with the table.     SQLSpecialColumns retrieves the following information about columns within a specified table:    
<ul>
<li>When IdentifierType is SQL_BEST_ROWID, it will return information of columns that uniquely identifies a row in          the table;</li>
<li>When IdentifierType is SQL_ROWVER, it will return information of columns that are automatically updated when any          value in the row is updated by a transaction.<br /><br />No data type in CUBRID will auto-update, so it only can return the columns which compose the unique keys.</li>
</ul>
</li>
</ul>]]></description>
                        <pubDate>Wed, 04 Jan 2012 00:10:48 -0800</pubDate>
                        <category>odbc</category>
                        <category>driver</category>
                        <category>release note</category>
                                </item>
        										        <item>
            <title>CUBRID OLEDB Driver Release Notes</title>
            <dc:creator>Laura Oh</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-oledb-driver-release-notes</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-oledb-driver-release-notes</guid>
                                    <description><![CDATA[<p>&nbsp;</p>
<h1>CUBRID OLEDB Driver 9.1.0.p1 Release Note (2013-05-06)</h1>
<p>&nbsp;</p>
<ul>
<li>Download:&nbsp;<a href="http://ftp.cubrid.org/CUBRID_Drivers/OLEDB_Driver/">http://ftp.cubrid.org/CUBRID_Drivers/OLEDB_Driver</a></li>
</ul>
<p>&nbsp;</p>
<h3 style="width: 670px; margin: 10px 0px; font-size: 16px; font-family: Calibri, 'Times New Roman', Tahoma, sans-serif;">Fixed bugs:</h3>
<ul style="color: #131212; font-family: Calibri, 'Times New Roman', Arial, Tahoma; line-height: 20px; font-size: 15px;">
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-390" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-390" style="color: #3b5999 !important; text-decoration: none;">APIS-390</a>&nbsp;- Requesting schema_info&nbsp;unnecessarily</li>
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-398" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-398" style="color: #3b5999 !important; text-decoration: none;">APIS-398</a>&nbsp;- OLEDB] The previous Connection String doesn't work when connecting to a remote CUBRID&nbsp;</li>
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-406" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-406" style="color: #3b5999 !important; text-decoration: none;">APIS-406</a>&nbsp;- OLEDB]&nbsp;provider 64bit doesn't work well - CLONE from CUBRIDSUS</li>
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-407" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-407" style="color: #3b5999 !important; text-decoration: none;">APIS-407</a>&nbsp;- OLEDB] Supporting Charset setting in OLEDB Provider</li>
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-457" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-457" style="color: #3b5999 !important; text-decoration: none;">APIS-457</a>&nbsp;- OLEDB]&nbsp;Some warnings in Test Connection, if using 64bit provider</li>
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-490" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-490" style="color: #3b5999 !important; text-decoration: none;">APIS-490</a>&nbsp;- When using CursorLocation = adUseClient, it is crashed!</li>
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-531" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-531" style="color: #3b5999 !important; text-decoration: none;">APIS-531</a>&nbsp;- OLEDB]&nbsp;OleDbCommand.ExecuteReader(CommandBehavior) problem</li>
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-534" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-534" style="color: #3b5999 !important; text-decoration: none;">APIS-534</a>&nbsp;- OLEDB]&nbsp;return value of OleDbDataAdapter.Fill(DataTable) is not right</li>
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-535" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-535" style="color: #3b5999 !important; text-decoration: none;">APIS-535</a>&nbsp;- OLEDB]if use Reader.GetBoolean to get a bit data, it will throw an exception</li>
<li style="text-align: left;"><a href="/wiki_apis/entry/apis-541" class="notexist" style="color: #3b5999 !important; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #ee0000;"></a><a href="http://www.jira.cubrid.org/browse/APIS-541" style="color: #3b5999 !important; text-decoration: none;">APIS-541</a>&nbsp;- OLEDB] rollback of OleDbTransaction is not work</li>
</ul>
<p>&nbsp;</p>
<ul>
</ul>
<h1>CUBRID OLEDB Driver 9.1.0 Release Note</h1>
<p><b>Updates summary since beta release</b><br />=================================================</p>
<ul>
<li>2 new schema rowsets added (Catalog and SQL language)</li>
<li>New test cases added (localization, data types handling, extended connect)</li>
<li>Changed the login internal procedure to use the connect_with_url CCI function; additional parameters included (login &amp; query timeout, auto-commit)</li>
<li>64-bit driver library available for download</li>
<li>Various updates in the source code; more code cleanup</li>
<li>Additional resources made available (new tutorial and short video)</li>
<li>Some improvements in LOB handling</li>
<li>New Installer version</li>
</ul>
<p><b>General development notes</b><br />=================================================</p>
<ul>
<li>The 8.4.1 provider code is based on the legacy CUBRID 3.1 OLE DB provider code</li>
<li>Various enhancements and support for latest CUBRID releases has been implemented</li>
<li>We have focused on supporting OLE DB Consumer templates (<a href="http://msdn.microsoft.com/en-us/library/8k76sd16%28v=vs.80%29.aspx" target="_self">http://msdn.microsoft.com/en-us/library/8k76sd16%28v=vs.80%29.aspx</a>). Direct OLE DB interfaces should work as well, but the technology is deprecated.&nbsp;</li>
<li>A full suite of open source test cases is now part of the driver code base release</li>
<li>Regarding .NET support (via System.Data.OleDb namespace), we are encouraging the use of the fully managed CUBRID ADO.NET driver instead (<a href="/wiki_apis/entry/cubrid-ado-net-driver" target="_self">http://www.cubrid.org/wiki_apis/entry/cubrid-ado-net-driver</a>).</li>
<li>The code is released under the BSD license (<a href="/bsd_license" target="_self">http://www.cubrid.org/bsd_license</a>).</li>
</ul>
<p><b>Release components</b></p>
<p>==============================================</p>
<ul>
<li>The driver source code (<a href="http://svn.cubrid.org/cubridapis/oledb/branches/RB-8.4.1/Source/" target="_self">http://svn.cubrid.org/cubridapis/oledb/branches/RB-8.4.1/Source/</a>)</li>
<li>The driver OLE DB Data Provider compiled library x32/x64 release (CUBRIDProvider.dll)</li>
<li>Win32 Driver Installer (with a short video)</li>
<li>Release notes</li>
<li>Test cases suite : 60+ OLE DB Consumer test cases (see the attachments for a test suite run output)</li>
<li>3 Tutorials</li>
</ul>
<p><b>Known limitations</b><br />=================================================</p>
<ul>
<li>There is limited support for queries not based on tables structures, in terms of columns automatic definitions</li>
<li>There is no full support yet for BLOB/BLOB Dynamic Accessors</li>
<li>Update() support is restricted to Auto-Commit mode = Off, which must be explicitly stated via session transaction.</li>
<li>Not all schema are implemented as defined here: <a href="http://msdn.microsoft.com/en-us/library/a6fhbff0%28v=vs.71%29.aspx" target="_self">http://msdn.microsoft.com/en-us/library/a6fhbff0%28v=vs.71%29.aspx</a>.</li>
<li>More test coverage is required for testing non-standard data types</li>
<li>We are supporting mainly C++ OLE DB templates; there is limited or no support for other driver usages (direct interfaces</li>
<li>Very limited support for some special data types: SET, MUTISET and SEQUENCE</li>
</ul>
<p><b>What's next/To-Do</b><br />=================================================</p>
<ul>
<li>Re-Generate and publish the Doxygen driver documentation</li>
<li>Continue to improve support for BLOB/CLOB</li>
<li>Make available in write-mode additional connection properties: loging &amp; query timeouts</li>
<li>Add more test cases coverage, in particular for CUBRID specific data types and for .NET OleDb access.</li>
<li>Remove the data provider distribution from the CUBRID standard installer</li>
<li>Continue SVN cleanup and update Trunk</li>
</ul>]]></description>
                        <pubDate>Mon, 23 Apr 2012 01:27:38 -0800</pubDate>
                        <category>cubrid</category>
                        <category>oledb</category>
                        <category>driver</category>
                        <category>release note</category>
                                </item>
        										        <item>
            <title>CUBRID OLEDB Driver 9.1.0.p1 Release Note</title>
            <dc:creator>Laura Oh</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-oledb-driver-9-1-0-p1-release-note</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-oledb-driver-9-1-0-p1-release-note</guid>
                                    <description><![CDATA[<table cellspacing="2" style="background: #cccccc;">
<tbody>
<tr style="background: #FFFFFF;">
<td>
<p><b>9.1.0.p1</b></p>
</td>
<td>
<h3>Fixed bugs:</h3>
<p>&nbsp;</p>
<ul>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-390">APIS-390</a>] - 수행하지  않는(필요없는) schema_info 요청</li>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-398">APIS-398</a>] - OLEDB]&nbsp;Driver를 사용하여 원격지의 CUBRID 연결 시 기존 Connection String이 적용되지 않음</li>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-406">APIS-406</a>] - OLEDB]&nbsp;provider 64비트가 정상동작하지 않음 - CLONE from CUBRIDSUS</li>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-407">APIS-407</a>] - OLEDB]&nbsp;OLEDB 프로바이더에 charset 지정 가능하도록 수정</li>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-457">APIS-457</a>] - OLEDB]&nbsp;Some warnings in Test Connection, if using 64bit provider</li>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-490">APIS-490</a>] - When  using CursorLocation = adUseClient, it is crashed! </li>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-531">APIS-531</a>] - OLEDB]&nbsp;OleDbCommand.ExecuteReader(CommandBehavior) problem</li>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-534">APIS-534</a>] - OLEDB]&nbsp;return value of OleDbDataAdapter.Fill(DataTable) is not right</li>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-535">APIS-535</a>] - OLEDB]if use Reader.GetBoolean to get a bit data, it will throw an  exception</li>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-541">APIS-541</a>] - OLEDB] rollback of OleDbTransaction is not work</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
</td>
</tr>
</tbody>
</table>]]></description>
                        <pubDate>Fri, 03 May 2013 18:44:35 -0800</pubDate>
                        <category>oledb</category>
                                </item>
        										        <item>
            <title>CUBRID OLEDB Driver</title>
            <dc:creator>Laura Oh</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-oledb-driver</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-oledb-driver</guid>
                                    <description><![CDATA[<p><b>OLE DB</b> (Object Linking and Embedding, Database) is an API designed by Microsoft for accessing data from a variety of sources in a uniform manner, thus can be used by all Microsoft platforms. It is a set of interfaces implemented using the Component Object Model (COM).</p>
<p><b>.NET Framework</b> is a software framework for Microsoft Windows operating systems. It includes a large library, and it supports several programming languages which allows language interoperability (each language can utilize code written in other languages). The .NET library is available to all the programming languages that .NET supports. A data provider in the .NET Framework serves as a bridge between an application and a data source; a data provider is used to retrieve data from a data source and to reconcile changes to that data back to the data source.</p>
<div class="grid col2"><span> 
<ul>
<li><a href="/?mid=downloads&amp;item=oledb_driver&amp;os=windows" target="_self">Download</a></li>
<li><a href="/wiki_apis/entry/cubrid-oledb-driver-installation-instructions-new">Installation Instructions</a></li>
<li><a href="/wiki_apis/entry/cubrid-oledb-tutorials" target="_self">Latest News, Guides and Tutorials</a></li>
<li><a href="/questions" target="_self">Questions&nbsp;and Answers</a></li>
<li><a href="/wiki_apis/entry/qa-ok-sign-cubrid-oledb-driver">QA OK Sign report</a></li>
</ul>
</span> <span> 
<ul>
<li><a href="/wiki_apis/entry/cubrid-oledb-driver-release-notes">Release Notes</a></li>
<li><a href="/manual/api/oledb/8.4.1/" target="_self">CUBRID OLEDB Documentation</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/ms722784(VS.85).aspx" target="_self">MSDN OLE DB Manual</a></li>
<li><a href="http://jira.cubrid.org/browse/APIS/component/10104" target="_self">JIRA Issue Tracker</a></li>
<li><a href="http://svn.cubrid.org/cubridapis/oledb/" target="_self">OLEDB SVN</a></li>
</ul>
</span></div>
<p>&nbsp;</p>
<p>OLEDB driver source code is&nbsp;distributed under the terms of&nbsp;<a href="/bsd_license" target="_self">BSD open source license</a>.</p>
<div id="endic_ext_wrapper" style="display: none;"></div>]]></description>
                        <pubDate>Wed, 04 Jan 2012 23:10:15 -0800</pubDate>
                        <category>oledb</category>
                        <category>driver</category>
                                </item>
        										        <item>
            <title>CUBRID ODBC Driver</title>
            <dc:creator>Laura Oh</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-odbc-driver</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-odbc-driver</guid>
                                    <description><![CDATA[<p>If you want to use CUBRID as a data source for your Windows applications using the ODBC Driver, follow tutorials provided in this project page.</p>
<p>&nbsp;</p>
<div class="grid col2"><span> 
<ul>
<li><a href="/?mid=downloads&amp;item=odbc_driver&amp;os=windows" target="_self">Download</a></li>
<li><a href="/wiki_apis/entry/cubrid-odbc-driver-installation-instructions-new">Installation Instructions</a></li>
<li><a href="/wiki_apis/entry/cubrid-odbc-tutorials" target="_self">Latest News, Guides and Tutorials</a></li>
<li><a href="/questions" target="_self">Questions and Answers</a></li>
</ul>
</span> <span> 
<ul>
<li><a href="/wiki_apis/entry/cubrid-odbc-driver-release-notes">Release Notes</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms714562(v=vs.85).aspx" target="_self">MSDN Manual</a></li>
<li><a href="http://jira.cubrid.org/browse/APIS/component/10103" target="_self">JIRA Issue Tracker</a></li>
<li><a href="/wiki_apis/entry/qa-ok-sign-cubrid-odbc-driver">QA OK Sign report</a></li>
</ul>
</span></div>
<p>&nbsp;</p>
<p>CUBRID ODBC driver supports ODBC version 3.52, ODBC core, and some of Level 1 and Level 2 APIs. Since it has been developed based on ODBC Spec 3.x, backward compatibility is not completely ensured for programs written using ODBC Spec 2.x.</p>
<p>&nbsp;</p>
<p>ODBC driver source code is distributed under the terms of <a href="/bsd_license" target="_self">BSD open source license</a>.</p>
<div id="endic_ext_wrapper" style="display: none;"></div>]]></description>
                        <pubDate>Mon, 15 Aug 2011 04:11:55 -0800</pubDate>
                        <category>odbc</category>
                        <category>driver</category>
                                </item>
        										        <item>
            <title>CUBRID OLEDB Driver Installation Instructions</title>
            <dc:creator>Laura Oh</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-oledb-driver-installation-instructions-new</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-oledb-driver-installation-instructions-new</guid>
                                    <description><![CDATA[<p>The scope of this tutorial is to provide an introduction to the CUBRID OLEDB Data Provider. We will show you where to get the CUBRID OLEDB Provider library, how to setup a CUBRID connection and how to develop some simple applications, mainly using OLE DB Consumer templates.</p>
<table border="1">
<tbody>
<tr>
<td>
<p><strong>Notice: If your CUBRID OLEDB driver version is 9.1.0.p1 or later, </strong>only one installation package is needed for both Windows 32 bit and 64 bit. Our new OLEDB installer supports CUBRID DB engine 8.4.1 or later.</p>
<p><strong>If your CUBRID OLEDB Driver version is 9.1.0 or older</strong>, it may have a problem on 64 bit operating system. Please see our installation tutorial for an old version: http://www.cubrid.org/wiki_apis/entry/cubrid-oledb-driver-installation-instructions-old</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<h2></h2>
<h2>Download</h2>
<p>Download a new installation package file which name is "<strong>CUBRID_OLEDB_Provider-&lt;version&gt;-win32-x64.zip</strong>".</p>
<p>It will install both <strong>CUBRIDProvider32.dll</strong> and <strong>CUBRIDPRovider64.dll</strong> at once. You can find a CUBRID OLEDB Provider installer at:</p>
<p><a href="http://ftp.cubrid.org/CUBRID_Drivers/OLEDB_Driver/">http://ftp.cubrid.org/CUBRID_Drivers/OLEDB_Driver/</a> or</p>
<p><a href="/?mid=downloads&amp;item=oledb_driver">http://www.cubrid.org/?mid=downloads&amp;item=oledb_driver</a></p>
<p>&nbsp;</p>
<h2>Driver Installation</h2>
<p>Run a CUBRID OLEDB Provider Installer (exe) and click the Next / Install Button.</p>
<p><img alt="image003.jpg" src="/files/attach/images/194379/669/644/image003.jpg" width="474" height="386" /></p>
<p>In your installation directory, you can see the following DLL files and uninstall. exe.</p>
<p><img alt="image005.jpg" src="/files/attach/images/194379/669/644/image005.jpg" width="245" height="99" /></p>
<h2>DB Connection</h2>
<h3>Data Link Properties Dialog Box</h3>
<p>To access this dialog box in Visual Studio .NET, select Connect to Database from the Tools menu or click the Connect to Database icon in Server Explorer. <br />You also can open this dialog box by double-clicking a universal data link (.udl) file in Windows Explorer, and in a variety of other ways, including programmatically.</p>
<p><br />1）you must install Visual Studio first, click &ldquo;Connect to Database&rdquo;</p>
<p>&nbsp;<img alt="image001p.jpg" src="/files/attach/images/194379/669/644/image001p.jpg" width="374" height="280" /></p>
<p>&nbsp;</p>
<p>2) Choose &lt;other&gt;,and .Net Famework Data Provider for OLE DB, Then click continue button <br /><img alt="image002p.jpg" src="/files/attach/images/194379/669/644/image002p.jpg" width="416" height="235" /></p>
<p>3) Choose CUBRID OLE DB Provider, then click Data links button<br /><img alt="image003p.jpg" src="/files/attach/images/194379/669/644/image003p.jpg" width="319" height="434" /></p>
<p>4) Fill in the information, and click Test Connection button, if driver connect database successful, success dialog will pop up.<br />More information can found in msdn:&nbsp;<a href="http://msdn.microsoft.com/en-us/library/79t8s5dk(v=vs.71).aspx">http://msdn.microsoft.com/en-us/library/79t8s5dk(v=vs.71).aspx</a></p>
<p><img alt="image004p.jpg" src="/files/attach/images/194379/669/644/image004p.jpg" width="499" height="370" /></p>
<p>5) A simple method of open dialog<br />First, create a text file, and modify extension to *.udl: 1.txt -&gt; 1.udl</p>
<p><img alt="image005p.jpg" src="/files/attach/images/194379/669/644/image005p.jpg" width="185" height="23" /></p>
<p>Second, double click 1.udl, dialog will pop up.<br /><img alt="image006p.jpg" src="/files/attach/images/194379/669/644/image006p.jpg" width="326" height="404" /></p>
<p>&nbsp;</p>
<p>&nbsp;6) &nbsp;Setting method of character set</p>
<p>Connection String:</p>
<p><span style="background-color: #ccffff;">"Provider=CUBRIDProvider;Data Source=demodb;Location=10.34.64.104;User ID=dba;Password=;Port=30000;Fetch Size=100;<span style="color: #ff0000;">Charset=utf-8</span>;"</span></p>
<h2>Configuration</h2>
<p>The following tutorials will help you when developing your application thru CUBRID OLEDB Provider.<span style="font-size: x-small;">&nbsp;</span></p>
<p>&nbsp;</p>
<ul>
<li><a href="/wiki_apis/entry/cubrid-oledb-overview">CUBRID OLEDB Overview</a></li>
<li><a href="/wiki_apis/entry/oledb-connection-string">OLEDB Connection String</a></li>
<li><a href="/manual/841/en/Configuring%20Connection%20Strings" target="_self">Configuring Connection String</a></li>
<li><a href="/wiki_apis/entry/oledb-consumer-templates-coding">OLEDB Consumer Templates Coding</a></li>
</ul>]]></description>
                        <pubDate>Fri, 26 Apr 2013 01:39:49 -0800</pubDate>
                        <category>driver</category>
                        <category>oledb</category>
                        <category>installation instructions</category>
                                </item>
        										        <item>
            <title>Installing CUBRID PHP Driver using PECL</title>
            <dc:creator>Esen Sagynov</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=installing-cubrid-php-driver-using-pecl</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=installing-cubrid-php-driver-using-pecl</guid>
                                    <description><![CDATA[<p>If PECL packager is installed in your system, the installation of CUBRID PHP Driver is straightforward. PECL will download and compile the library for you.</p>
<h3>Requirements</h3>
<p>To install the PHP Driver using PECL, you need to have CUBRID Database installed in your system since PHP Driver is dependent on CUBRID CCI API.</p>
<h3>Installation</h3>
<p>Type the following command to install the latest version of CUBRID PHP Driver.</p>
<div editor_component="code_highlighter" code_type="Bash" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">sudo pecl install cubrid</div>
<p>If you need older version of the driver, you can indicate its exact version like:</p>
<div editor_component="code_highlighter" code_type="Bash" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">sudo pecl install cubrid-8.3.0.0005</div>
<blockquote class="q5">
<p>During the installation you will be prompted to enter&nbsp;<b>"CUBRID base install dir [!autodetect] :"</b>. Just to make sure your installation goes smoothly, enter the full path to the directory where you have installed CUBRID. Ex: if CUBRID was installed at&nbsp;<i>/home/cubridtest/CUBRID</i>, then enter&nbsp;<i>/home/cubridtest/CUBRID</i>.</p>
</blockquote>
<p>a) If you have Centos 6.0 and above or Fedora 15 and above, then <b>do not edit</b> the php.ini as stated in step b and instead create a file named <b>cubrid.ini</b> in which you add only the line <b>extension=cubrid.so</b>. This file has to be placed in the <b>/etc/php.d</b> folder.</p>
<p>b) <b>Edit the php.ini</b> (default location: <i>/etc/php5/apache2/php.ini</i> or <i>/etc/php.ini</i>) and add the following two lines at the end of the file.</p>
<div editor_component="code_highlighter" code_type="Plain" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">[!CUBRID] extension=cubrid.so</div>
<p>To apply the changes, restart your Web Server.</p>
<h2>What If I don't have PECL installed?</h2>
<p>If you do not have PECL installed, follow these instructions to get it installed in your system.</p>
<h3>Ubuntu Instructions</h3>
<p>In order to install CUBRID-PHP API on Ubuntu, you will need PHP Development Tools (<b>phpize)</b> and <b>pear</b> packager.</p>
<ul>
<li>Type the following command to <b>install phpize</b>:&nbsp;<br />
<div editor_component="code_highlighter" code_type="Bash" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">sudo apt-get install php5-dev</div>
</li>
<li>Type the following command to <b>install pear package</b>:&nbsp;
<div class="code">
<div editor_component="code_highlighter" code_type="bash" first_line="1" collapse="false" nogutter="false" nocontrols="false">sudo apt-get install php-pear</div>
</div>
</li>
</ul>
<p>Then follow the above instructions to install CUBRID PHP Driver.</p>
<h3>Fedora/CentOS Instructions</h3>
<p>In order to install CUBRID-PHP API on Fedora/CentOS, you will need <b>PHP PEAR</b> and <b>phpize</b> packages.</p>
<ul>
<li><b>Install phpize</b>. Remember that <i>php-dev</i> should be either PHP 5.2.x compatible or PHP 5.3.x since CUBRID-PHP Extension is developed for these PHP versions. If your Linux distribution installs earlier version, you need to update it.&nbsp;
<div class="code">
<div editor_component="code_highlighter" code_type="bash" first_line="1" collapse="false" nogutter="false" nocontrols="false">yum install php-devel</div>
</div>
</li>
<li><b>Download PEAR package</b>:&nbsp;
<div class="code">
<div editor_component="code_highlighter" code_type="bash" first_line="1" collapse="false" nogutter="false" nocontrols="false">wget http://pear.php.net/go-pear.phar</div>
</div>
</li>
<li><b>Run PEAR package</b> with PHP:&nbsp;
<div class="code">
<div editor_component="code_highlighter" code_type="bash" first_line="1" collapse="false" nogutter="false" nocontrols="false">php go-pear.phar</div>
</div>
</li>
</ul>
<h2>What's Next?</h2>
<div>
<ul>
<li>Refer to CUBRID PHP Tutorials</li>
</ul>
</div>]]></description>
                        <pubDate>Thu, 29 Dec 2011 21:18:19 -0800</pubDate>
                        <category>php</category>
                        <category>driver</category>
                        <category>tutorial</category>
                        <category>installation instructions</category>
                        <category>PECL</category>
                                    <slash:comments>3</slash:comments>
                    </item>
        										        <item>
            <title>CUBRID Sharding with node-cubrid 2.0</title>
            <dc:creator>CUBRID</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-sharding-with-node-js-2-0</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-sharding-with-node-js-2-0</guid>
                                    <description><![CDATA[<p>In this guide we will go through the process of setting up a CUBRID SHARD environment and using the CUBRID Node.js 2.0 driver to insert and retrieve data from the shard DB nodes.</p>
<p>If you are not familiar with the CUBRID Node.js driver yet, check out our CUBRID Node.js Tutorials. Same goes for the CUBRID SHARD basic concepts &ndash; see CUBRID SHARD.</p>
<div></div>
<h2>Setting up the CUBRID SHARD environment</h2>
<div></div>
<p>The first thing we need to do is set up the CUBRID SHARD and the shard databases architecture. For simplicity we will use two shard DB nodes.&nbsp;</p>
<p>So let&rsquo;s get right to it. First, in each shard DB node we will create a database and a user account, and start the database:</p>
<div>
<ul>
<li>Shard DB name: sharddb</li>
<li>Shard DB user account: shard</li>
<li>Shard DB user password: shard123</li>
</ul>
</div>
<p>To do this, we will use the CUBRID command line tool &ldquo;csql&rdquo;. In each shard DB node, type the following commands:</p>
<div>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Bash" editor_component="code_highlighter">#&nbsp;Creating&nbsp;CUBRID&nbsp;SHARD&nbsp;DB<br /> cubrid&nbsp;createdb&nbsp;sharddb<br /> <br /> #&nbsp;Creating&nbsp;CUBRID&nbsp;SHARD&nbsp;user&nbsp;account<br /> csql&nbsp;-S&nbsp;-u&nbsp;dba&nbsp;sharddb&nbsp;-c&nbsp;"create&nbsp;user&nbsp;shard&nbsp;password&nbsp;'shard123'"<br /> <br /> #&nbsp;Starting&nbsp;CUBRID&nbsp;SHARD&nbsp;DB<br /> cubrid&nbsp;server&nbsp;start&nbsp;sharddb</div>
</div>
<p>Next, we have to change the shard configurations. In the node that we choose to be the shard server we have to edit three shard configuration files located in the &#92;CUBRID&#92;conf directory:</p>
<div>
<ul>
<li>shard.conf</li>
<li>shard_connection.txt</li>
<li>shard_key.txt</li>
</ul>
</div>
<p>The first file, shard.conf, contains the shard broker parameters. The only thing to do here is to make sure that the following parameters are set:</p>
<div></div>
<div>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Plain" editor_component="code_highlighter">SHARD_DB_NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;sharddb<br /> SHARD_DB_USER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;shard<br /> SHARD_DB_PASSWORD&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;shard123</div>
</div>
<div></div>
<p>In the second file - shard_connection.txt, we will configure the network addresses of the shard DB nodes. In our setup, one node is on the same machine as the shard server, and the other one is located somewhere else in the local area network.&nbsp;</p>
<div>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Plain" editor_component="code_highlighter">#&nbsp;shard-id&nbsp;&nbsp;	real-db-name&nbsp;&nbsp;		connection-info<br /> 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;		sharddb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;		localhost<br /> 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;		sharddb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;		10.0.0.186</div>
</div>
<div></div>
<div></div>
<p>Make sure that you set the correct IP address for the second shard DB node.</p>
<p>The last file that we need to configure is shard_key.txt. This file configures the shard DB mapping configuration, for the shard key hash value, as follows:</p>
<div>
<ul>
<li>[!%shard_key]: Sets the shard key section</li>
<li>min: The minimum value range of the shard key hash results.</li>
<li>max: The maximum range of the shard key hash results.</li>
<li>shard_id: The shard identifier</li>
</ul>
</div>
<div>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Plain" editor_component="code_highlighter">[!%shard_key]<br /> #min		max		shard_id<br /> 0		127&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;		0<br /> 128		255&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;		1</div>
</div>
<div></div>
<div></div>
<p>This configuration means that an INSERT statement will execute on shard 0 when the shard key hash result created by default hash function is between 0 and 127, and will execute on shard 1 when the shard key hash result created by the default hash function is between 128 and 255.</p>
<div></div>
<div></div>
<p>We are now ready to start the CUBRID SHARD service:</p>
<div>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Bash" editor_component="code_highlighter">cubrid&nbsp;shard&nbsp;start<br /> @&nbsp;cubrid&nbsp;shard&nbsp;start<br /> ++&nbsp;cubrid&nbsp;shard&nbsp;start:&nbsp;success</div>
</div>
<div></div>
<div></div>
<div></div>
<p>We have one more step to complete before we can use Node.js with CUBRID SHARD &ndash; prepare our test data.&nbsp;</p>
<div></div>
<div></div>
<div>Let&rsquo;s create a table in each shard DB:</div>
<div>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Bash" editor_component="code_highlighter">csql&nbsp;-C&nbsp;-u&nbsp;shard&nbsp;-p&nbsp;'shard123'&nbsp;sharddb@localhost&nbsp;-c&nbsp;"create&nbsp;table&nbsp;student&nbsp;(s_no&nbsp;int,&nbsp;s_name&nbsp;varchar,&nbsp;s_age&nbsp;int,&nbsp;primary&nbsp;key(s_no))"</div>
</div>
<div></div>
<h2>Using the CUBRID Node.js 2.0 driver with CUBRID SHARD</h2>
<div></div>
<p>The code examples we will show in this guide use the CUBRID Node.js 2.0 driver to perform the followings operations:</p>
<div>
<ul>
<li>Connect to the shard broker</li>
<li>Insert data into the shard DB nodes</li>
<li>Query the data we inserted</li>
</ul>
</div>
<h3>Inserting data:</h3>
<p>Let&rsquo;s see how to insert data into the shard DB nodes:</p>
<div>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="CSharp" editor_component="code_highlighter">var&nbsp;CUBRID&nbsp;=&nbsp;require('node-cubrid'),<br /> &nbsp;&nbsp;Helpers&nbsp;=&nbsp;CUBRID.Helpers,<br /> &nbsp;&nbsp;ActionQueue&nbsp;=&nbsp;CUBRID.ActionQueue;<br /> <br /> var&nbsp;client&nbsp;=&nbsp;CUBRID.createCUBRIDConnection('localhost',&nbsp;45011,&nbsp;'shard',&nbsp;'shard123',&nbsp;'sharddb');<br /> ActionQueue.enqueue(<br /> &nbsp;&nbsp;[<br /> &nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(cb)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;client.connect(cb);<br /> &nbsp;&nbsp;&nbsp;&nbsp;},<br /> &nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(cb)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Helpers.logInfo('Connected.');<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;i&nbsp;=&nbsp;0;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ActionQueue.while(<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;()&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;i&nbsp;&lt;&nbsp;255;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(cb)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Helpers.logInfo('Executing&nbsp;insert&nbsp;number&nbsp;'&nbsp;+&nbsp;i&nbsp;+&nbsp;'.');<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;client.executeWithTypedParams('INSERT&nbsp;INTO&nbsp;student&nbsp;VALUES&nbsp;(/*+&nbsp;shard_key&nbsp;*/&nbsp;?,?,?)',&nbsp;[i,&nbsp;'name_'&nbsp;+&nbsp;i,&nbsp;20&nbsp;+&nbsp;i&nbsp;%&nbsp;8],&nbsp;//&nbsp;i&nbsp;%&nbsp;8&nbsp;to&nbsp;set&nbsp;the&nbsp;age&nbsp;of&nbsp;the&nbsp;student&nbsp;between&nbsp;20&nbsp;and&nbsp;27<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;['int',&nbsp;'varchar',&nbsp;'int'],&nbsp;function&nbsp;()&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;client.commit(function&nbsp;()&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i++;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cb.call();<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;()&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cb.call();<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);<br /> &nbsp;&nbsp;&nbsp;&nbsp;},<br /> &nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(cb)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;client.close(cb);<br /> &nbsp;&nbsp;&nbsp;&nbsp;}<br /> &nbsp;&nbsp;],<br /> &nbsp;&nbsp;function&nbsp;()&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;Helpers.logInfo('Connection&nbsp;closed.');<br /> &nbsp;&nbsp;}<br /> );</div>
</div>
<div></div>
<div></div>
<p>The output is:</p>
<div>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Plain" editor_component="code_highlighter">Connected.<br /> Executing&nbsp;insert&nbsp;number&nbsp;0.<br /> Executing&nbsp;insert&nbsp;number&nbsp;1.<br /> Executing&nbsp;insert&nbsp;number&nbsp;2.<br /> Executing&nbsp;insert&nbsp;number&nbsp;3.<br /> (&hellip;)<br /> Executing&nbsp;insert&nbsp;number&nbsp;251.<br /> Executing&nbsp;insert&nbsp;number&nbsp;252.<br /> Executing&nbsp;insert&nbsp;number&nbsp;253.<br /> Executing&nbsp;insert&nbsp;number&nbsp;254.<br /> Connection&nbsp;closed.</div>
</div>
<div></div>
<div></div>
<p>As you can see, there are a few differences in the above code when compared to connecting and inserting in a &ldquo;normal&rdquo; CUBRID database setup. The most important one is the connection port. By default, the CUBRID SHARD broker port is 45011, but you can change it in the shard.conf file.</p>
<div></div>
<div></div>
<div></div>
<p>Another key difference is in the INSERT statement that we execute. Here we have to specify the shard_key column using a shard SQL hint. It will tell the shard broker which shard DB to choose according to the setup we made in the shard_key.txt file.</p>
<p>Tip: For more information about shard SQL hints see Selecting a Shard DB through the Shard SQL Hint.</p>
<div></div>
<div></div>
<p>So, let&rsquo;s see what CUBRID SHARD did when it executed these statements, by checking the shard broker log file located in &#92;CUBRID&#92;log&#92;broker&#92;proxy_log:</p>
<div>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Plain" editor_component="code_highlighter">Select&nbsp;shard.&nbsp;(shard_id:0,&nbsp;key_column:[shard_key_column],&nbsp;shard_key_id:0).<br /> Select&nbsp;shard.&nbsp;(prev_shard_id:-1,&nbsp;curr_shard_id:0).&nbsp;context(cid:1,&nbsp;uid:12,&nbsp;is_busy:Y,&nbsp;is_in_tran:N,&nbsp;is_prepare_for_execute:N,&nbsp;free_on_end_tran:N,&nbsp;free_on_client_io_write:N,&nbsp;free_context:N,&nbsp;is_client_in_tran:Y,&nbsp;is_cas_in_tran:N,&nbsp;is_bypass_msg:N,&nbsp;waiting_event:((nil),&nbsp;-),&nbsp;func_code:-1,&nbsp;stmt_h_id:-1,&nbsp;stmt_hint_type:-1,&nbsp;wait_timeout:30,&nbsp;client_id:1,&nbsp;shard_id:-1,&nbsp;cas_id:-1,&nbsp;error_ind:0,&nbsp;error_code:0,&nbsp;error_msg:[-]&nbsp;).<br /> As&nbsp;expected,&nbsp;the&nbsp;CUBRID&nbsp;SHARD&nbsp;broker&nbsp;selected&nbsp;our&nbsp;first&nbsp;shard&nbsp;node&nbsp;and&nbsp;ran&nbsp;the&nbsp;statement&nbsp;on&nbsp;it.&nbsp;It&nbsp;is&nbsp;the&nbsp;same&nbsp;for&nbsp;the&nbsp;first&nbsp;127&nbsp;queries.&nbsp;So&nbsp;what&nbsp;about&nbsp;query&nbsp;number&nbsp;128&nbsp;and&nbsp;next?<br /> Select&nbsp;shard.&nbsp;(shard_id:1,&nbsp;key_column:[shard_key_column],&nbsp;shard_key_id:4).<br /> Select&nbsp;shard.&nbsp;(prev_shard_id:-1,&nbsp;curr_shard_id:1).&nbsp;context(cid:1,&nbsp;uid:12,&nbsp;is_busy:Y,&nbsp;is_in_tran:N,&nbsp;is_prepare_for_execute:N,&nbsp;free_on_end_tran:N,&nbsp;free_on_client_io_write:N,&nbsp;free_context:N,&nbsp;is_client_in_tran:Y,&nbsp;is_cas_in_tran:N,&nbsp;is_bypass_msg:N,&nbsp;waiting_event:((nil),&nbsp;-),&nbsp;func_code:-1,&nbsp;stmt_h_id:-1,&nbsp;stmt_hint_type:-1,&nbsp;wait_timeout:30,&nbsp;client_id:1,&nbsp;shard_id:-1,&nbsp;cas_id:-1,&nbsp;error_ind:0,&nbsp;error_code:0,&nbsp;error_msg:[-]&nbsp;).<br /> For&nbsp;the&nbsp;128th&nbsp;INSERT&nbsp;statement&nbsp;(&ldquo;INSERT&nbsp;INTO&nbsp;student&nbsp;VALUES&nbsp;(/*+&nbsp;shard_key&nbsp;*/&nbsp;128,&rsquo;name_128&rsquo;,20)&rdquo;)&nbsp;the&nbsp;broker&nbsp;selected&nbsp;the&nbsp;other&nbsp;shard&nbsp;node&nbsp;since&nbsp;according&nbsp;to&nbsp;our&nbsp;shard_key.txt&nbsp;configuration,&nbsp;INSERT&nbsp;statements&nbsp;with&nbsp;the&nbsp;key&nbsp;column&nbsp;value&nbsp;(here&nbsp;s_no&nbsp;=&nbsp;128)&nbsp;bigger&nbsp;than&nbsp;127&nbsp;will&nbsp;execute&nbsp;on&nbsp;the&nbsp;second&nbsp;shard&nbsp;DB&nbsp;node.</div>
</div>
<div></div>
<h3>Querying the CUBRID SHARD DB nodes</h3>
<div></div>
<p>In the next section we will learn how to retrieve the data from our shard DB nodes. The only thing that is different here is that CUBRID SHARD uses the (old) 8.4.x TCP protocol for query execution, so before we can run a query we have to tell Node.js driver to use this protocol by calling the setEnforceOldQueryProtocol() method. Now we can execute our queries, again using the shard SQL hints:</p>
<div>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="CSharp" editor_component="code_highlighter">var&nbsp;CUBRID&nbsp;=&nbsp;require('node-cubrid'),<br /> &nbsp;&nbsp;Helpers&nbsp;=&nbsp;CUBRID.Helpers,<br /> &nbsp;&nbsp;ActionQueue&nbsp;=&nbsp;CUBRID.ActionQueue,<br /> &nbsp;&nbsp;Result2Array&nbsp;=&nbsp;CUBRID.Result2Array;<br /> <br /> var&nbsp;client&nbsp;=&nbsp;CUBRID.createCUBRIDConnection('localhost',&nbsp;45011,&nbsp;'shard',&nbsp;'shard123',&nbsp;'sharddb');<br /> ActionQueue.enqueue(<br /> &nbsp;&nbsp;[<br /> &nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(cb)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;client.connect(cb);<br /> &nbsp;&nbsp;&nbsp;&nbsp;},<br /> &nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(cb)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;client.setEnforceOldQueryProtocol(true);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Helpers.logInfo('Querying:&nbsp;select&nbsp;*&nbsp;from&nbsp;student&nbsp;/*+&nbsp;shard_id(0)&nbsp;*/');<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;client.query('select&nbsp;*&nbsp;from&nbsp;student&nbsp;/*+&nbsp;shard_id(0)&nbsp;*/',&nbsp;cb);<br /> &nbsp;&nbsp;&nbsp;&nbsp;},<br /> &nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(result,&nbsp;queryHandle,&nbsp;cb)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Helpers.logInfo('Resutls&nbsp;from&nbsp;the&nbsp;first&nbsp;shard&nbsp;(shard_id&nbsp;=&nbsp;0):');<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Helpers.logInfo('Query&nbsp;result&nbsp;rows&nbsp;count:&nbsp;'&nbsp;+&nbsp;Result2Array.TotalRowsCount(result));<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;arr&nbsp;=&nbsp;Result2Array.RowsArray(result);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;(var&nbsp;j&nbsp;=&nbsp;0;&nbsp;j&nbsp;&lt;&nbsp;arr.length;&nbsp;j++)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Helpers.logInfo(arr[j].toString());<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;client.closeQuery(queryHandle,&nbsp;cb);<br /> &nbsp;&nbsp;&nbsp;&nbsp;},<br /> &nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(queryHandle,&nbsp;cb)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;client.close(cb);<br /> &nbsp;&nbsp;&nbsp;&nbsp;}<br /> &nbsp;&nbsp;],<br /> &nbsp;&nbsp;function&nbsp;()&nbsp;{<br /> &nbsp;&nbsp;}<br /> );</div>
</div>
<div></div>
<div></div>
<p>Here we used the /*+ shard_id(0) */ SQL hint to specify which shard DB we are targeting. As expected, we have retrieved the data from the first shard DB node:</p>
<div>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Plain" editor_component="code_highlighter">Querying:&nbsp;select&nbsp;*&nbsp;from&nbsp;student&nbsp;/*+&nbsp;shard_id(0)&nbsp;*/<br /> Results&nbsp;from&nbsp;the&nbsp;first&nbsp;shard&nbsp;(shard_id&nbsp;=&nbsp;0):<br /> Query&nbsp;result&nbsp;rows&nbsp;count:&nbsp;128<br /> 0,name_0,20<br /> 1,name_1,21<br /> 2,name_2,22<br /> 3,name_3,23<br /> (&hellip;)<br /> 124,name_124,24<br /> 125,name_125,25<br /> 126,name_126,26<br /> 127,name_127,27</div>
</div>
<div></div>
<div></div>
<div></div>
<p>To get the data from the other shard DB the only thing we have to change is the parameter of the SQL hint to 1: /*+ shard_id(1) */ and we will get the desired results:</p>
<div>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Plain" editor_component="code_highlighter">Querying:&nbsp;select&nbsp;*&nbsp;from&nbsp;student&nbsp;/*+&nbsp;shard_id(1)&nbsp;*/<br /> Results&nbsp;from&nbsp;the&nbsp;first&nbsp;shard&nbsp;(shard_id&nbsp;=&nbsp;1):<br /> Query&nbsp;result&nbsp;rows&nbsp;count:&nbsp;127<br /> 128,name_128,20<br /> 129,name_129,21<br /> 130,name_130,22<br /> 131,name_131,23<br /> (&hellip;)<br /> 251,name_251,23<br /> 252,name_252,26<br /> 253,name_253,25<br /> 254,name_254,26</div>
</div>
<div></div>
<div></div>
<div></div>
<p>What if we want to get data from an invalid shard id, for example if we run &ldquo;select * from student /*+ shard_id(2) */&rdquo;? The shard broker will obviously return an error. So let&rsquo;s look at the log file after we ran this query:</p>
<div>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Plain" editor_component="code_highlighter">Create&nbsp;new&nbsp;sql&nbsp;statement.&nbsp;(index:0).&nbsp;statement(index:0,&nbsp;num_alloc:1,&nbsp;stmt_h_id:0,&nbsp;status:1,&nbsp;context&nbsp;id:0,&nbsp;context&nbsp;uid:1,&nbsp;num&nbsp;pinned:0,&nbsp;lru_next:(nil),&nbsp;lru_prev:(nil),&nbsp;sql_stmt:[select&nbsp;*&nbsp;from&nbsp;student&nbsp;/*+&nbsp;shard_id(2)&nbsp;*/]).&nbsp;context(cid:0,&nbsp;uid:1,&nbsp;is_busy:Y,&nbsp;is_in_tran:N,&nbsp;is_prepare_for_execute:N,&nbsp;free_on_end_tran:N,&nbsp;free_on_client_io_write:N,&nbsp;free_context:N,&nbsp;is_client_in_tran:Y,&nbsp;is_cas_in_tran:N,&nbsp;is_bypass_msg:N,&nbsp;waiting_event:((nil),&nbsp;-),&nbsp;func_code:-1,&nbsp;stmt_h_id:-1,&nbsp;stmt_hint_type:-1,&nbsp;wait_timeout:30,&nbsp;client_id:0,&nbsp;shard_id:-1,&nbsp;cas_id:-1,&nbsp;error_ind:0,&nbsp;error_code:0,&nbsp;error_msg:[-]&nbsp;).<br /> Invalid&nbsp;shard/CAS&nbsp;id&nbsp;is&nbsp;requested.&nbsp;(shard_id:2,&nbsp;cas_id:-1).<br /> send&nbsp;error(msg)&nbsp;to&nbsp;the&nbsp;client.&nbsp;(error_ind:-1,&nbsp;error_code:-1001,&nbsp;errro_msg:-)</div>
</div>
<div></div>
<h2>References and links</h2>
<div></div>
<div>
<table style="border: none;" width="516" cellpadding="0" cellspacing="0" border="1" class="MsoNormalTable">
<tbody>
<tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; height: 39.75pt; mso-prop-change: Ovidiu 20130318T1806;">
<td style="width: 2.2in; border-top-style: solid; border-bottom-style: solid; border-left-style: solid; border-color: windowtext; border-width: 1pt; padding: 0in 5.4pt; height: 39.75pt;" valign="top" width="211">
<p class="MsoNoSpacing">CUBRID Node.js driver home page<o:p></o:p></p>
</td>
<td style="width: 203.75pt; border: solid windowtext 1.0pt !msorm; border-left: none !msorm; mso-border-left-alt: solid windowtext .5pt !msorm; mso-border-alt: solid windowtext .5pt !msorm; padding: 0in 5.4pt 0in 5.4pt !msorm; height: 39.75pt;" valign="top" width="305">
<p class="MsoNoSpacing"><a href="https://github.com/CUBRID/node-cubrid">https://github.com/CUBRID/node-cubrid</a> <o:p></o:p></p>
<p class="MsoNoSpacing"><a href="https://github.com/organizations/CUBRID">https://github.com/organizations/CUBRID</a> <o:p></o:p></p>
</td>
</tr>
<tr style="mso-yfti-irow: 1; height: 39.75pt; mso-prop-change: Ovidiu 20130318T1806;">
<td style="width: 2.2in; border-bottom-style: solid; border-left-style: solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-top-style: none; padding: 0in 5.4pt; height: 39.75pt;" valign="top" width="211">
<p class="MsoNoSpacing">Online driver documentation<o:p></o:p></p>
</td>
<td style="width: 303.75pt; border-top: none !msorm; border-left: none !msorm; border-bottom: solid windowtext 1.0pt !msorm; border-right: solid windowtext 1.0pt !msorm; mso-border-top-alt: solid windowtext .5pt !msorm; mso-border-left-alt: solid windowtext .5pt !msorm; mso-border-alt: solid windowtext .5pt !msorm; padding: 0in 5.4pt 0in 5.4pt !msorm; height: 39.75pt;" valign="top" width="405">
<p class="MsoNoSpacing"><a href="https://github.com/CUBRID/node-cubrid/tree/master/documentation">https://github.com/CUBRID/node-cubrid/tree/master/documentation</a> <o:p></o:p></p>
</td>
</tr>
<tr style="mso-yfti-irow: 2; height: 39.75pt; mso-prop-change: Ovidiu 20130318T1806;">
<td style="width: 2.2in; border-bottom-style: solid; border-left-style: solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-top-style: none; padding: 0in 5.4pt; height: 39.75pt;" valign="top" width="211">
<p class="MsoNoSpacing">Online Wiki<o:p></o:p></p>
</td>
<td style="width: 303.75pt; border-top: none !msorm; border-left: none !msorm; border-bottom: solid windowtext 1.0pt !msorm; border-right: solid windowtext 1.0pt !msorm; mso-border-top-alt: solid windowtext .5pt !msorm; mso-border-left-alt: solid windowtext .5pt !msorm; mso-border-alt: solid windowtext .5pt !msorm; padding: 0in 5.4pt 0in 5.4pt !msorm; height: 39.75pt;" valign="top" width="405">
<p class="MsoNoSpacing"><a href="/wiki_apis/entry/cubrid-node-js-driver">http://www.cubrid.org/wiki_apis/entry/cubrid-node-js-driver</a> <o:p></o:p></p>
</td>
</tr>
<tr style="mso-yfti-irow: 3; height: 39.75pt; mso-prop-change: Ovidiu 20130318T1806;">
<td style="width: 2.2in; border-bottom-style: solid; border-left-style: solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-top-style: none; padding: 0in 5.4pt; height: 39.75pt;" valign="top" width="211">
<p class="MsoNoSpacing">Driver tutorials and examples<o:p></o:p></p>
</td>
<td style="width: 303.75pt; border-top: none !msorm; border-left: none !msorm; border-bottom: solid windowtext 1.0pt !msorm; border-right: solid windowtext 1.0pt !msorm; mso-border-top-alt: solid windowtext .5pt !msorm; mso-border-left-alt: solid windowtext .5pt !msorm; mso-border-alt: solid windowtext .5pt !msorm; padding: 0in 5.4pt 0in 5.4pt !msorm; height: 39.75pt;" valign="top" width="405">
<p class="MsoNoSpacing"><a href="/wiki_apis/entry/cubrid-node-js-tutorials">http://www.cubrid.org/wiki_apis/entry/cubrid-node-js-tutorials</a> <o:p></o:p></p>
</td>
</tr>
<tr style="mso-yfti-irow: 4; height: 39.75pt;">
<td style="width: 2.2in; border-bottom-style: solid; border-left-style: solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-top-style: none; padding: 0in 5.4pt; height: 39.75pt;" valign="top" width="211">
<p class="MsoNormal"><span style="font-size: 12.0pt; line-height: 107%;">CUBRID   SHARD documentation<o:p></o:p></span></p>
</td>
<td style="width: 303.75pt; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; mso-border-top-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; height: 39.75pt;" valign="top" width="405">
<p style="line-height: normal;" class="MsoNormal"><span style="font-size: 12.0pt; color: #4472c4; mso-bidi-font-weight: bold;"><a href="/manual/843/en/CUBRID%20SHARD"><span style="color: #4472c4;">http://www.cubrid.org/manual/843/en/CUBRID%20SHARD</span></a><o:p></o:p></span></p>
<p style="line-height: normal;" class="MsoNormal"><span style="font-size: 12.0pt; color: #4472c4; mso-bidi-font-weight: bold;">&nbsp;</span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 5; height: 39.75pt;">
<td style="width: 2.2in; border-bottom-style: solid; border-left-style: solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-top-style: none; padding: 0in 5.4pt; height: 39.75pt;" valign="top" width="211">
<p class="MsoNormal"><span style="font-size: 12.0pt; line-height: 107%; mso-bidi-font-weight: bold;">Database Sharding the right way: Easy, Reliable and Open source<o:p></o:p></span></p>
</td>
<td style="width: 303.75pt; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; mso-border-top-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; height: 39.75pt;" valign="top" width="405">
<p style="line-height: normal;" class="MsoNormal"><span style="font-size: 12.0pt; mso-bidi-font-weight: bold;"><a href="http://www.slideshare.net/cubrid/database-sharding-the-right-way-easy-reliable-and-open-source-highload-2012">http://www.slideshare.net/cubrid/database-sharding-the-right-way-easy-reliable-and-open-source-highload-2012</a><o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow: 6; mso-yfti-lastrow: yes; height: 39.75pt;">
<td style="width: 2.2in; border-bottom-style: solid; border-left-style: solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-top-style: none; padding: 0in 5.4pt; height: 39.75pt;" valign="top" width="211">
<p class="MsoNormal"><span style="font-size: 12.0pt; line-height: 107%; mso-bidi-font-weight: bold;">Selecting a Shard DB through the Shard SQL Hint<span style="font-size: 12.0pt; line-height: 107%;"><o:p></o:p></span></span></p>
</td>
<td style="width: 303.75pt; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; mso-border-top-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; height: 39.75pt;" valign="top" width="405">
<p style="line-height: normal;" class="MsoNormal"><span style="font-size: 12.0pt; mso-bidi-font-weight: bold;"><a href="/manual/90/en/Selecting%20a%20Shard%20DB%20through%20the%20SHARD%20SQL%20Hint">http://www.cubrid.org/manual/90/en/Selecting%20a%20Shard%20DB%20through%20the%20SHARD%20SQL%20Hint</a><span style="font-size: 12.0pt;"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: 12.0pt; line-height: 107%;">&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<div></div>
<div></div>
<div></div>
<p>We hope you enjoyed using the CUBRID Node.js 2.0 driver in a sharding environment!</p>
<div></div>
<div></div>
<p>Please let us know your feedback and suggestions, so we can improve! And do not forget, tryout the CUBRID Node.js 2.0 driver!</p>]]></description>
                        <pubDate>Tue, 26 Mar 2013 23:53:17 -0800</pubDate>
                        <category>node.js</category>
                        <category>node.js 2.0</category>
                        <category>tutorial</category>
                        <category>sharding</category>
                                </item>
        										        <item>
            <title>CUBRID PDO Driver Installation Instructions</title>
            <dc:creator>Esen Sagynov</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-pdo-driver-installation-instructions</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-pdo-driver-installation-instructions</guid>
                                    <description><![CDATA[<p>There are several ways to install CUBRID PDO Driver. Below you will see instructions for each of them.</p>
<ul>
<li>[Installing CUBRID PDO Driver using PECL] (Linux)</li>
<li>[Downloading and Installing Precompiled CUBRID PHP/PDO Driver (Windows)]</li>
<li><a href="/wiki_tutorials/entry/create-a-cubrid-database-vm-with-vagrant-and-chef-cookbook-under-5-minutes">Create a CUBRID Database VM with Vagrant and Chef Cookbook under 5 minutes</a>&nbsp;(Linux)</li>
<li>[Build CUBRID PDO Driver on Mac OS X through PECL using CCI Driver] (Mac OS X)</li>
</ul>]]></description>
                        <pubDate>Tue, 03 Jan 2012 17:29:09 -0800</pubDate>
                        <category>pdo</category>
                        <category>installation instructions</category>
                                </item>
        										        <item>
            <title>Installing CUBRID PDO Driver using PECL</title>
            <dc:creator>Esen Sagynov</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=installing-cubrid-pdo-driver-using-pecl</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=installing-cubrid-pdo-driver-using-pecl</guid>
                                    <description><![CDATA[<p>If PECL packager is installed in your system, the installation of CUBRID PDO Driver is straightforward. PECL will download and compile the library for you.</p>
<h3>Requirements</h3>
<p>To install the PDO Driver using PECL, you need to have CUBRID Database installed in your system since PDO&nbsp;Driver is dependent on CUBRID CCI API.</p>
<h3>Installation</h3>
<p>Type the following command to install the latest version of CUBRID PDO Driver.</p>
<div style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nocontrols="false" nogutter="false" collapse="false" first_line="1" code_type="Bash" editor_component="code_highlighter">sudo pecl install pdo_cubrid</div>
<p>If you need older version of the driver, you can indicate its exact version like:</p>
<div style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nocontrols="false" nogutter="false" collapse="false" first_line="1" code_type="Bash" editor_component="code_highlighter">sudo pecl install pdo_cubrid-8.3.1.0003</div>
<blockquote class="q5">
<p>During the installation you will be prompted to enter&nbsp;<b>"CUBRID base install dir [!autodetect] :"</b>. Just to make sure your installation goes smoothly, enter the full path to the directory where you have installed CUBRID. Ex: if CUBRID was installed at&nbsp;<i>/home/cubridtest/CUBRID</i>, then enter&nbsp;<i>/home/cubridtest/CUBRID</i>.</p>
</blockquote>
<p>a) If you have <strong>Centos 6.0 and above, Fedora 15 and above, or Ubuntu 13.04 and above</strong>, create a file named <b>pdo_cubrid.ini</b> in <em>/etc/php5/conf.d/</em>&nbsp;or <em>/etc/php.d</em> (check where in your system other <em>.ini</em>&nbsp;files are located).</p>
<p>b) Otherwise,&nbsp;<b>edit the php.ini</b>&nbsp;(default location:&nbsp;<i>/etc/php5/apache2/php.ini </i>or <i>/etc/php.ini</i>).</p>
<p>Then in the above <strong>.ini</strong> file add the following line:</p>
<div style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nocontrols="false" nogutter="false" collapse="false" first_line="1" code_type="Plain" editor_component="code_highlighter">extension=pdo_cubrid.so</div>
<p>To apply the changes, restart your Web Server.</p>
<h2>What If I don't have PECL installed?</h2>
<ul>
<li><a target="_self" href="/wiki_apis/entry/installing-cubrid-php-driver-using-pecl">Install PECL packager</a></li>
</ul>
<h2>What's Next?</h2>
<div>
<ul>
<li>Refer to <a href="/wiki_apis/entry/cubrid-pdo-tutorials">CUBRID PDO Tutorials</a></li>
</ul>
</div>]]></description>
                        <pubDate>Tue, 03 Jan 2012 17:15:06 -0800</pubDate>
                        <category>pdo</category>
                        <category>installation instructions</category>
                        <category>tutorial</category>
                                </item>
        										        <item>
            <title>Build CUBRID PDO Driver on Mac OS X through PECL using CCI Driver</title>
            <dc:creator>CUBRID</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=build-cubrid-pdo-driver-on-mac-os-x-through-pecl-using-cci-driver</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=build-cubrid-pdo-driver-on-mac-os-x-through-pecl-using-cci-driver</guid>
                                    <description><![CDATA[<p>In this tutorial you will learn how to install CUBRID PDO driver on Mac OS X through PECL repository using CUBRID CCI driver.</p>
<h2>Download CCI driver</h2>
<p>CUBRID PDO driver has a dynamic dependency on CCI driver. You can download either <a href="/?mid=downloads&amp;item=cci_driver&amp;os=detect">64 or 32 bit version of CUBRID CCI diver</a>&nbsp;depending on your Mac OS architecture.&nbsp;Once you download it, you need to copy the contents of the <span style="font-family: monospace;">/lib</span> directory to&nbsp;<span style="font-family: monospace;">/usr/lib</span>&nbsp;and the contents of <span style="font-family: monospace;">/include</span> directory to <span style="font-family: monospace;">/usr/include</span>. The following example illustrates how to extract a 64-bit version and copy its contents.</p>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Bash" editor_component="code_highlighter">tar&nbsp;zxvf&nbsp;CUBRID-CCI-8.4.1.4009-x64.macosx.tar.gz<br /> sudo&nbsp;cp&nbsp;CUBRID-CCI-8.4.1.4009-x64/lib/*&nbsp;/usr/lib<br /> sudo&nbsp;cp&nbsp;CUBRID-CCI-8.4.1.4009-x64/include/*&nbsp;/usr/include</div>
<h2>Install PDO driver using PECL</h2>
<p>Type the following command to install the latest version of CUBRID PDO Driver from PECL repository.</p>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Bash" editor_component="code_highlighter">sudo&nbsp;pecl&nbsp;install pdo_cubrid</div>
<p>If you need older version of the driver, you can indicate its exact version like:</p>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Bash" editor_component="code_highlighter">sudo pecl install pdo_cubrid-8.4.3.0001</div>
<p>During the installation you will be prompted to enter "<strong>CUBRID base install dir [!autodetect]:</strong>". Enter that same directory where we have extracted CUBRID CCI driver files.</p>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Bash" editor_component="code_highlighter">CUBRID&nbsp;base&nbsp;install&nbsp;dir&nbsp;[!autodetect]&nbsp;:&nbsp;/usr</div>
<h2>Configure php.ini</h2>
<p>Now find the <b>php.ini</b> file and add the following line which instructs your Web server or FastCGI Process Manager to load CUBRID PDO extension with the next restart.</p>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Plain" editor_component="code_highlighter">extension=pdo_cubrid.so</div>
<p>Done! Now restart your Web server to load CUBRID extension.</p>
<h2>Test CUBRID PHP API</h2>
<p>Create a simple <b>test.php</b> file with the following contents:</p>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Php" editor_component="code_highlighter">&lt;?php&nbsp;phpinfo();&nbsp;?&gt;</div>
<p>In your browser visit <a target="_self" href="http://localhost/test.php">http://localhost/test.php</a>. Search for "<b>pdo_cubrid</b>". You should see entries like <i>Version</i>, <i>CCI Version</i>, and <i>CUBRID Version</i>.</p>
<p>If you have any questions, please ask them at our <a target="_self" href="/questions">Q&amp;A site</a>. If any issues with installation, post on our <a target="_self" href="/forum">forum</a>.</p>
<div id="endic_ext_wrapper"></div>
<div style="display: none;" id="endic_ext_wrapper"></div>]]></description>
                        <pubDate>Tue, 07 May 2013 23:11:14 -0800</pubDate>
                        <category>pdo</category>
                        <category>driver</category>
                        <category>Mac OS X</category>
                        <category>build instructions</category>
                        <category>CCI</category>
                                </item>
        										        <item>
            <title>CUBRID OLEDB Driver Installation Instructions Old</title>
            <dc:creator>Laura Oh</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-oledb-driver-installation-instructions-old</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-oledb-driver-installation-instructions-old</guid>
                                    <description><![CDATA[<p>The scope of this tutorial is to provide an introduction to the CUBRID OLEDB Data Provider, version 8.4.1. We will show you where to get the CUBRID OLEDB Provider library, how to setup a CUBRID connection and how to develop some simple applications, mainly using OLE DB Consumer templates.</p>
<h2><b>Requirements</b></h2>
<ul>
<li>Windows Vista/7</li>
<li>CUBRID 8.4.1 (<b>The CUBRID version must match the Driver version)</b></li>
<li>Visual Studio 2010 Express Edition (<a href="http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express" target="_self">http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express</a>)</li>
<li>.NET framework 3.5 or above (<a href="http://www.microsoft.com/download/en/details.aspx?id=21" target="_self">http://www.microsoft.com/download/en/details.aspx?id=21</a>)</li>
</ul>
<h2>CUBRID OLE DB Data Provider</h2>
<p>Before you start to developing applications with CUBRID, you will need the provider library (<b>CUBRIDProvider.dll</b>). Make sure to download the appropiate DLL according to your CUBRID installation. You can check the CUBRID version by using the command "<span style="font-family: monospace;">cubrid --version</span>". You have several options:</p>
<h3>Use official installer</h3>
<p>Use the official <a href="/?mid=downloads&amp;item=oledb_driver" target="_self">CUBRID OLED DB Data Provider Installer</a>. You can follow this <i>1 minute</i> video tutorial to see how to install CUBRIDProvider using the installer.</p>
<p><iframe src="http://www.youtube.com/embed/FN_6c9x9UOA" width="420" frameborder="0" height="315"></iframe></p>
<div style="display: none;" id="endic_ext_wrapper"></div>
<h3>Download the compiled libraries</h3>
<p>&nbsp;</p>
<ul style="line-height: normal;">
<li><a href="http://sourceforge.net/projects/cubrid/files/CUBRID-Drivers/OLEDB_Driver/CUBRIDProvider-8.4.1.zip/download" target="_self">32 bit OLEDB Data Provider</a></li>
<li><a href="http://sourceforge.net/projects/cubrid/files/CUBRID-Drivers/OLEDB_Driver/CUBRIDProvider-8.4.1-x64.zip/download" target="_self">64 bit OLEDB Data Provider</a></li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>If you choose to install it manually (by just downloading the CUBRIDProvider.dll), you need to properly register the driver before you can use it, through one of the following registration methods:</p>
<p>1.	Download the CUBRIDProvider.tlb file from here, and make sure it is located in the same folder with the CUBRIDProvider.dll, and run the following command in that folder:</p>
<div nocontrols="false" nogutter="true" collapse="false" first_line="1" code_type="Bash" editor_component="code_highlighter" style="line-height: normal; padding: 5px; background-image: url(/modules/editor/styles/default/modules/editor/components/code_highlighter/code.png); background-color: #fafafa; background-position: 100% 0%; background-repeat: no-repeat no-repeat; border: 1px 1px 1px 5px dotted dotted dotted solid #666666 #666666 #666666 #22aaee;">regsvr32 CUBRIDProvider.dll</div>
<p>2.	Download the CUBRIDProvider.reg file from here, update it by specifying your own path location of the CUBRIDProvider.dll (the CUBRIDProvider.reg file you downloaded will contain by default the following location: C:&#92;CUBRID&#92;oledb&#92;CUBRIDProvider.dll) and then run the following command:</p>
<div nocontrols="false" nogutter="true" collapse="false" first_line="1" code_type="Bash" editor_component="code_highlighter" style="line-height: normal; padding: 5px; background-image: url(/modules/editor/styles/default/modules/editor/components/code_highlighter/code.png); background-color: #fafafa; background-position: 100% 0%; background-repeat: no-repeat no-repeat; border: 1px 1px 1px 5px dotted dotted dotted solid #666666 #666666 #666666 #22aaee;">regedit CUBRIDProvider.reg</div>
<h3>Compile from source code</h3>
<p><span style="line-height: normal;">Checkout the code from the SVN repository:</span><a href="http://svn.cubrid.org/cubridapis/oledb/branches/RB-8.4.1/Source/" target="_self" style="line-height: normal;">http://svn.cubrid.org/cubridapis/oledb/branches/RB-8.4.1/Source/</a><span style="line-height: normal;">.</span></p>
<p><span style="line-height: normal;">For compiling the source code and the example in this tutorial, use Microsoft Visual Studio Express edition &ndash; you can download it from: </span><a href="http://www.microsoft.com/express/Downloads/#2010-Visual-CPP" target="_self" style="line-height: normal;">http://www.microsoft.com/express/Downloads/#2010-Visual-CPP</a><span style="line-height: normal;">. Please make sure you download the appropriate version &ndash; 32 or 64-bit.</span></p>
<h3><span style="line-height: normal;">Compile or modify the installer</span></h3>
<p><span style="line-height: normal;">If you wish to make certain changes to our OLEDB Data Provider Installer, refer to </span><span style="line-height: normal;">[Compiling the CUBRID OLE DB installer].</span></p>]]></description>
                        <pubDate>Mon, 23 Apr 2012 01:36:40 -0800</pubDate>
                        <category>oledb</category>
                        <category>driver</category>
                        <category>installation instructions</category>
                                </item>
        										        <item>
            <title>CUBRID OLEDB Driver 9.1.0 release note</title>
            <dc:creator>Laura Oh</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-oledb-driver-9-1-0-release-note</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-oledb-driver-9-1-0-release-note</guid>
                                    <description><![CDATA[<table style="background: #cccccc;" cellspacing="2">
<tbody>
<tr style="background: #FFFFFF;">
<td>
<p><b>9.1.0.0001</b></p>
</td>
<td>
<p><b>Updates summary since beta release</b><br />=================================================</p>
<ul>
<li style="text-align: left;">2 new schema rowsets added (Catalog and SQL language)</li>
<li style="text-align: left;">New test cases added (localization, data types handling, extended connect)</li>
<li style="text-align: left;">Changed the login internal procedure to use the connect_with_url CCI function; additional parameters included (login &amp; query timeout, auto-commit)</li>
<li style="text-align: left;">64-bit driver library available for download</li>
<li style="text-align: left;">Various updates in the source code; more code cleanup</li>
<li style="text-align: left;">Additional resources made available (new tutorial and short video)</li>
<li style="text-align: left;">Some improvements in LOB handling</li>
<li style="text-align: left;">New Installer version</li>
</ul>
<p><b>General development notes</b><br />=================================================</p>
<ul>
<li style="text-align: left;">The 8.4.1 provider code is based on the legacy CUBRID 3.1 OLE DB provider code</li>
<li style="text-align: left;">Various enhancements and support for latest CUBRID releases has been implemented</li>
<li style="text-align: left;">We have focused on supporting OLE DB Consumer templates (<a style="color: #3b5999 !important; text-decoration: none;" target="_self" href="http://msdn.microsoft.com/en-us/library/8k76sd16%28v=vs.80%29.aspx">http://msdn.microsoft.com/en-us/library/8k76sd16%28v=vs.80%29.aspx</a>). Direct OLE DB interfaces should work as well, but the technology is deprecated.&nbsp;</li>
<li style="text-align: left;">A full suite of open source test cases is now part of the driver code base release</li>
<li style="text-align: left;">Regarding .NET support (via System.Data.OleDb namespace), we are encouraging the use of the fully managed CUBRID ADO.NET driver instead (<a style="color: #3b5999 !important; text-decoration: none;" target="_self" href="/wiki_apis/entry/cubrid-ado-net-driver">http://www.cubrid.org/wiki_apis/entry/cubrid-ado-net-driver</a>).</li>
<li style="text-align: left;">The code is released under the BSD license (<a style="color: #3b5999 !important; text-decoration: none;" target="_self" href="/bsd_license">http://www.cubrid.org/bsd_license</a>).</li>
</ul>
<p><b>Release components<br /></b>==============================================</p>
<ul>
<li style="text-align: left;">The driver source code (<a style="color: #3b5999 !important; text-decoration: none;" target="_self" href="http://svn.cubrid.org/cubridapis/oledb/branches/RB-8.4.1/Source/">http://svn.cubrid.org/cubridapis/oledb/branches/RB-8.4.1/Source/</a>)</li>
<li style="text-align: left;">The driver OLE DB Data Provider compiled library x32/x64 release (CUBRIDProvider.dll)</li>
<li style="text-align: left;">Win32 Driver Installer (with a short video)</li>
<li style="text-align: left;">Release notes</li>
<li style="text-align: left;">Test cases suite : 60+ OLE DB Consumer test cases (see the attachments for a test suite run output)</li>
<li style="text-align: left;">3 Tutorials</li>
</ul>
<p><b>Known limitations</b><br />=================================================</p>
<ul>
<li style="text-align: left;">There is limited support for queries not based on tables structures, in terms of columns automatic definitions</li>
<li style="text-align: left;">There is no full support yet for BLOB/BLOB Dynamic Accessors</li>
<li style="text-align: left;">Update() support is restricted to Auto-Commit mode = Off, which must be explicitly stated via session transaction.</li>
<li style="text-align: left;">Not all schema are implemented as defined here:&nbsp;<a style="color: #3b5999 !important; text-decoration: none;" target="_self" href="http://msdn.microsoft.com/en-us/library/a6fhbff0%28v=vs.71%29.aspx">http://msdn.microsoft.com/en-us/library/a6fhbff0%28v=vs.71%29.aspx</a>.</li>
<li style="text-align: left;">More test coverage is required for testing non-standard data types</li>
<li style="text-align: left;">We are supporting mainly C++ OLE DB templates; there is limited or no support for other driver usages (direct interfaces</li>
<li style="text-align: left;">Very limited support for some special data types: SET, MUTISET and SEQUENCE</li>
</ul>
<p><b>What's next/To-Do</b><br />=================================================</p>
<ul>
<li style="text-align: left;">Re-Generate and publish the Doxygen driver documentation</li>
<li style="text-align: left;">Continue to improve support for BLOB/CLOB</li>
<li style="text-align: left;">Make available in write-mode additional connection properties: loging &amp; query timeouts</li>
<li style="text-align: left;">Add more test cases coverage, in particular for CUBRID specific data types and for .NET OleDb access.</li>
<li style="text-align: left;">Remove the data provider distribution from the CUBRID standard installer</li>
<li style="text-align: left;">Continue SVN cleanup and update Trunk</li>
</ul>
</td>
</tr>
</tbody>
</table>]]></description>
                        <pubDate>Thu, 25 Apr 2013 22:58:53 -0800</pubDate>
                        <category>release note</category>
                        <category>oledb</category>
                                </item>
        										        <item>
            <title>CUBRID ODBC Driver Installation Instructions</title>
            <dc:creator>Laura Oh</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-odbc-driver-installation-instructions</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-odbc-driver-installation-instructions</guid>
                                    <description><![CDATA[<div>If you want to use CUBRID as a data source for your Windows applications using the ODBC Driver, this article will help you achieve this.</div>
<table border="1">
<tbody>
<tr>
<td>
<div><strong>Notice: If your CUBRID ODBC Driver version is 9.1.0.p1 or later,</strong> only one installation package is needed for both Windows 32 bit and 64 bit. Our new ODBC installer  supports CUBRID DB engine 8.4.1 or later.</div>
<div><strong>If your CUBRID ODBC Driver version is 9.1.0 or older,</strong> it may have a problem on 64 bit operating system. Please see our installation tutorial for an old version: <a href="/wiki_apis/entry/cubrid-odbc-driver-installation-instructions-old">http://www.cubrid.org/wiki_apis/entry/cubrid-odbc-driver-installation-instructions-old</a></div>
</td>
</tr>
</tbody>
</table>
<h2>Download</h2>
<div>Download a new installation package file which name is "<strong>cubrid-odbc-&lt;version&gt;-win32-x64</strong>.zip". <br />It will install both <strong>cubrid_odbc32.dll</strong> and <strong>cubrid_odbc64.dll </strong>at once. You can find a CUBRId ODBC inataller at:<br /> <br /><a href="http://ftp.cubrid.org/CUBRID_Drivers/ODBC_Driver/">http://ftp.cubrid.org/CUBRID_Drivers/ODBC_Driver/</a> or <br /><a href="/?mid=downloads&amp;item=odbc_driver">http://www.cubrid.org/?mid=downloads&amp;item=odbc_driver</a></div>
<h2>Driver Installation</h2>
<div>Run a CUBRID ODBC Installer (exe) and click the Next / Install Button.</div>
<div><img height="386" width="474" src="/files/attach/images/194379/583/644/image003.jpg" alt="image003.jpg" /></div>
<div>In your installation directory, you can see the following DLL files and uninstall. exe.</div>
<div><img height="127" width="194" src="/files/attach/images/194379/583/644/image005.jpg" alt="image005.jpg" /></div>
<h2>Configuration</h2>
<div>On your PC, first open the <code style="color: #000000; margin: 0px 2px; padding: 2px; white-space: nowrap; border: 1px solid #aecff7; background-color: #f7f7f7; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; font-size: 12px;" class="menu">Control Panel</code> =&gt; <code style="color: #000000; margin: 0px 2px; padding: 2px; white-space: nowrap; border: 1px solid #aecff7; background-color: #f7f7f7; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; font-size: 12px;" class="menu">Administrative Tools</code>. You should see a list of tools available on your Windows OS as shown below.</div>
<div><img title="Windows Administrative Tools" rel="xe_gallery" style="cursor: pointer;" class="iePngFix" height="502" width="690" src="/files/attach/images/49/434/139/data-sources-odbc.png" alt="Windows Administrative Tools" /></div>
<div>Double click on the <code style="color: #000000; margin: 0px 2px; padding: 2px; white-space: nowrap; border: 1px solid #aecff7; background-color: #f7f7f7; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; font-size: 12px;" class="menu">Data Sources (ODBC)</code> to open it.</div>
<div></div>
<h3>OPEN DATA SOURCES ON WINDOWS 64-BIT</h3>
<div><span style="color: #131212; font-family: Calibri, 'Times New Roman', Arial, Tahoma;"><span style="font-size: 15px; line-height: 20px;">If your driver version is 9.1.0.p1 or later, you should launch Data Sources (ODBC) as shown above as it will start 64-bit version of Data Sources (ODBC) program, otherwise you need to start 32-bit version of Data Sources (ODBC) which is located in  C:&#92;Windows&#92;SysWOW64&#92;odbcad32.exe. Make sure you start this one. SysWOW64 means Windows 32-bits on Windows 64-bit.</span></span></div>
<div><span style="color: #131212; font-family: Calibri, 'Times New Roman', Arial, Tahoma;"><span style="font-size: 15px; line-height: 20px;"><br /></span></span></div>
<h3>Create new data source</h3>
<div><img height="388" width="470" src="/files/attach/images/194379/583/644/image007.PNG" alt="image007.PNG" /></div>
<div>Then navigate back to the <code style="color: #000000; margin: 0px 2px; padding: 2px; white-space: nowrap; border: 1px solid #aecff7; background-color: #f7f7f7; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; font-size: 12px;" class="menu">User DSN</code> tab and click on the <code style="color: #000000; margin: 0px 2px; padding: 2px; white-space: nowrap; border: 1px solid #aecff7; background-color: #f7f7f7; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; font-size: 12px;" class="menu">Add</code> button.</div>
<div><img title="Add User Data Source Name" rel="xe_gallery" style="cursor: pointer;" class="iePngFix" height="390" width="471" src="/files/attach/images/49/434/139/odbc-data-source-admin-user-dsn-add.png" alt="Add User Data Source Name" /></div>
<div>In the pop-up window choose the CUBRID Driver and click the <code style="color: #000000; margin: 0px 2px; padding: 2px; white-space: nowrap; border: 1px solid #aecff7; background-color: #f7f7f7; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; font-size: 12px;" class="menu">Finish</code> button.</div>
<div><img title="Create New Data Source" rel="xe_gallery" style="cursor: pointer;" class="iePngFix" height="358" width="478" src="/files/attach/images/49/434/139/odbc-create-new-data-source.png" alt="Create New Data Source" /></div>
<div>Fill out the fields with the necessary data as shown in the image below.</div>
<div><img title="CUBRID ODBC Data Source Name Config" rel="xe_gallery" style="cursor: pointer;" class="iePngFix" height="456" width="406" src="/files/attach/images/49/434/139/odbc-config-cubrid-data-sources.png" alt="CUBRID ODBC Data Source Name Config" /></div>
<ul>
<li style="text-align: left;"><b>DSN</b>: Give a desired name to this data source (eg. your database name).</li>
<li style="text-align: left;"><b>Description</b>: Enter the description for this data source.</li>
<li style="text-align: left;"><b>DB Name</b>: Enter the target database name.</li>
<li style="text-align: left;"><b>DB User</b>: Database user name.</li>
<li style="text-align: left;"><b>Password</b>: Database user password.</li>
<li style="text-align: left;"><b>Server Address</b>: Database host address (<i>localhost</i>). You can also enter the remote server's IP address.</li>
<li style="text-align: left;"><b>Server Port</b>: CUBRID Broker's port number. The default port is <b>33000</b>.<br />You can check this in your command line terminal. Type <code style="color: #cccccc; margin: 0px 2px; padding: 0px 2px; white-space: nowrap; border: 1px solid #cccccc; background-color: #000000; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; font-size: 12px;" class="cmd">cubrid service status</code>. In the output you will see<b>broker1</b> in the first column and the port number in the third. You will notice that the broker uses the default port number 33000. If set otherwise, enter that port number into this field.
<div style="margin: 7px 0px; text-align: justify;"><img title="CUBRID Service Status" rel="xe_gallery" style="cursor: pointer;" class="iePngFix" height="322" width="677" src="/files/attach/images/49/434/139/cmd-cubrid-service-status.png" alt="CUBRID Service Status" /></div>
Another way to find the Broker port number is in the Broker's configuration file located at<code style="color: #cccccc; margin: 0px 2px; padding: 0px 2px; white-space: nowrap; border: 1px solid #cccccc; background-color: #000000; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; font-size: 12px;" class="cmd">%CUBRID%confcubrid_broker.conf</code>. See the <code style="color: inherit; margin: 0px 2px; padding: 2px 5px; white-space: nowrap; border: 1px solid #cccccc; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; font-size: 12px;">BROKER_PORT</code> value.</li>
<li style="text-align: left;"><b>FETCH_SIZE</b>: Set the number of record to fetch from the database. <b>100</b> should be reasonable.</li>
</ul>
<div>Once filled out, click <code style="color: #000000; margin: 0px 2px; padding: 2px; white-space: nowrap; border: 1px solid #aecff7; background-color: #f7f7f7; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; font-size: 12px;" class="menu">OK</code> button. You will see <b>CUBRID</b> among the <b>User Data Sources</b> as shown below.</div>
<div><img title="ODBC User Data Sources" rel="xe_gallery" style="cursor: pointer;" class="iePngFix" height="390" width="471" src="/files/attach/images/49/434/139/odbc-user-data-source.png" alt="ODBC User Data Sources" /></div>
<h2>Connecting to a database directly without DSN</h2>
<div>It is also possible to connect to the CUBRID database directly in the application source code indicating the connecting string. In this case, use the following connection string.</div>
<div>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" editor_component="code_highlighter" code_type="Plain" first_line="1" collapse="false" nogutter="false">conn = "driver={CUBRID Driver};server=localhost;port=33000;uid=dba;pwd=;db_name=demodb;"</div>
</div>
<div style="font-family: Calibri, 'Times New Roman', Tahoma, sans-serif; background-color: #f4f7fa;"></div>
<h2>Before establishing a connection</h2>
<div>Make sure that your <a href="/wiki_tutorials/entry/start-or-autostart-cubrid-database">database is started</a> before you try to connect or link to a CUBRID database. Otherwise, you will receive an <b>ODBC call failed</b> error.</div>
<div>This is all you need to do in order to connect to a CUBRID database using the ODBC driver.</div>]]></description>
                        <pubDate>Fri, 26 Apr 2013 00:30:40 -0800</pubDate>
                        <category>odbc</category>
                        <category>Driver</category>
                        <category>installation instructions</category>
                        <category>tutorial</category>
                        <category>Windows</category>
                                </item>
        										        <item>
            <title>CUBRID ODBC Driver Installation Instructions Old</title>
            <dc:creator>Laura Oh</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=odbc_cubrid</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=odbc_cubrid</guid>
                                    <description><![CDATA[<p>If you want to use CUBRID as a data source for your Windows applications using the ODBC Driver, this article will help you achieve this.</p>
<blockquote class="q4">
<p><b>Notice:</b> <strong>This Tutorial is only available for cubrid-odbc-8.4.0 or older versions</strong>. CUBRID ODBC installation used to have a problem on 64 bit OS so we have offered a new installation package available for both 32bit and 64 bit OS since 2013-05. If your CUBRID DB Engine is running on 64 bit OS, please choose a new installation package by following : <a href="/wiki_apis/entry/cubrid-odbc-driver-installation-instructions">http://www.cubrid.org/wiki_apis/entry/cubrid-odbc-driver-installation-instructions</a></p>
</blockquote>
<p>If you still wish to separately download the ODBC driver, perhaps, for remote connection when CUBRID is not installed on your machine, you can download it from <a href="/?mid=downloads&amp;item=odbc_driver&amp;os=windows" target="_self">http://www.cubrid.org/?mid=downloads&amp;item=odbc_driver&amp;os=windows</a> or from <a href="http://ftp.cubrid.org/CUBRID_Drivers/ODBC_Driver/">http://ftp.cubrid.org/CUBRID_Drivers/ODBC_Driver/</a>.</p>
<h2>Configuration</h2>
<h3>Open Data Sources on Windows 32-bit</h3>
<p>On you PC, first open the <code class="menu">Control Panel</code> =&gt; <code class="menu">Administrative Tools</code>. You should see a list of tools available on your Windows OS as shown below.</p>
<p><img editor_component="image_link" height="502" width="690" src="/files/attach/images/49/434/139/data-sources-odbc.png" alt="Windows Administrative Tools" /></p>
<p>Double click on the <code class="menu">Data Sources (ODBC)</code> to open it.</p>
<h3>OPEN DATA SOURCES ON WINDOWS 64-BIT</h3>
<p>If you are using 64-bit Windows, you should not launch <code class="menu">Data Sources (ODBC)</code> as shown above as it will start 64-bit version of <code class="menu">Data Sources (ODBC)</code> program. Since CUBRID ODBC driver is available only in 32-bit version, we need to start 32-bit version of <code class="menu">Data Sources (ODBC)</code> which is located in <span style="font-family: monospace;"><b>c:&#92;Windows&#92;System32&#92;odbcad32.exe</b></span>. Make sure you start this one.</p>
<h3>Create new data source</h3>
<p>Once you started the 32-bit version of <code class="menu">Data Sources (ODBC)</code>, navigate to the <code class="menu">Drivers</code> tab and make sure the <b>CUBRID Driver</b> is available as shown below, which will mean that it has been successfully installed on your system.</p>
<p><img editor_component="image_link" height="390" width="471" src="/files/attach/images/49/434/139/odbc-data-source-admin-drivers.png" alt="ODBC Drivers" /></p>
<p>Then navigate back to the <code class="menu">User DSN</code> tab and click on the <code class="menu">Add</code> button.</p>
<p><img editor_component="image_link" height="390" width="471" src="/files/attach/images/49/434/139/odbc-data-source-admin-user-dsn-add.png" alt="Add User Data Source Name" /></p>
<p>In the pop-up window choose the CUBRID Driver and click the <code class="menu">Finish</code> button.</p>
<p><img editor_component="image_link" height="358" width="478" src="/files/attach/images/49/434/139/odbc-create-new-data-source.png" alt="Create New Data Source" /></p>
<p>Fill out the fields with the necessary data as shown in the image below.</p>
<p><img editor_component="image_link" height="456" width="406" src="/files/attach/images/49/434/139/odbc-config-cubrid-data-sources.png" alt="CUBRID ODBC Data Source Name Config" /></p>
<ul>
<li><b>DSN</b>: Give a desired name to this data source (eg. your database name).</li>
<li><b>Description</b>: Enter the description for this data source.</li>
<li><b>DB Name</b>: Enter the target database name.</li>
<li><b>DB User</b>: Database user name.</li>
<li><b>Password</b>: Database user password.</li>
<li><b>Server Address</b>: Database host address (<i>localhost</i>). You can also enter the remote server's IP address.</li>
<li><b>Server Port</b>: CUBRID Broker's port number. The default port is <b>33000</b>.<br />You can check this in your command line terminal. Type <code class="cmd">cubrid service status</code>. In the output you will see <b>broker1</b> in the first column and the port number in the third. You will notice that the broker uses the default port number 33000. If set otherwise, enter that port number into this field.
<p><img editor_component="image_link" height="322" width="677" src="/files/attach/images/49/434/139/cmd-cubrid-service-status.png" alt="CUBRID Service Status" /></p>
Another way to find the Broker port number is in the Broker's configuration file located at <code class="cmd">%CUBRID%confcubrid_broker.conf</code>. See the <code>BROKER_PORT</code> value. </li>
<li><b>FETCH_SIZE</b>: Set the number of record to fetch from the database. <b>100</b> should be reasonable.</li>
</ul>
<p>Once filled out, click <code class="menu">OK</code> button. You will see <b>CUBRID</b> among the <b>User Data Sources</b> as shown below.</p>
<p><img editor_component="image_link" height="390" width="471" src="/files/attach/images/49/434/139/odbc-user-data-source.png" alt="ODBC User Data Sources" /></p>
<h2>Connecting to a database directly without DSN</h2>
<p>It is also possible to connect to the CUBRID database directly in the application source code indicating the connecting string. In this case, use the following connection string.</p>
<div editor_component="code_highlighter" code_type="CSharp" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">conn = "driver={CUBRID Driver};server=localhost;port=33000;uid=dba;pwd=;db_name=demodb;"</div>
<h2>Before establishing a connection</h2>
<p>Make sure that your <a href="/wiki_tutorials/entry/start-or-autostart-cubrid-database" target="_self">database is started</a> before you try to connect or link to a CUBRID database. Otherwise, you will receive an <b>ODBC call failed</b> error.</p>
<p>This is all you need to do in order to connect to a CUBRID database using the ODBC driver.</p>]]></description>
                        <pubDate>Mon, 15 Aug 2011 03:58:06 -0800</pubDate>
                        <category>odbc</category>
                        <category>driver</category>
                        <category>installation instructions</category>
                        <category>tutorial</category>
                        <category>Windows</category>
                                </item>
        										        <item>
            <title>QA OK Sign - CUBRID OLEDB Driver</title>
            <dc:creator></dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=qa-ok-sign-cubrid-oledb-driver</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=qa-ok-sign-cubrid-oledb-driver</guid>
                                    <description><![CDATA[<ul>
<li><span style="background-color: #f4f7fa; color: #131212; font-family: Calibri, 'Times New Roman', Arial, Tahoma; font-size: 15px; line-height: 20px;">[CUBRID OLEDB 9.0.1.p1 QA Test Report]</span></li>
</ul>]]></description>
                        <pubDate>Thu, 25 Apr 2013 23:42:53 -0800</pubDate>
                        <category>oledb</category>
                        <category>driver</category>
                                </item>
        										        <item>
            <title>CUBRID OLEDB 9.0.1.p1 QA Test Report</title>
            <dc:creator></dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=new-document</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=new-document</guid>
                                    <description><![CDATA[<p><span lang="EN-US">1.</span><span lang="EN-US">&nbsp;&nbsp;&nbsp;</span><span lang="EN-US">Test  Info</span></p>
<p><span lang="EN-US"> </span></p>
<ul>
<li>Driver Build: ODBC 9.1, OLEDB 9.1</li>
<li>Server Build: CUBRID 9.1 (9.1.0.0212) (64bit release build for linux_gnu)</li>
<li>Test Platform: Windows7 32bit, Windows XP 32bit, Windows2003 64bit</li>
<li>.Net Framework: 3.5</li>
</ul>
<p><span lang="EN-US">2.</span><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span lang="EN-US">Test  Results</span></p>
<table style="line-height: 14.25pt; background-color: white; width: 225px; border-collapse: collapse; margin-left: 22.1pt;" class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 13.5pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; padding-left: 5.4pt; width: 90pt; padding-right: 5.4pt; background: silver; height: 13.5pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0cm;" width="120"><b><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">OLEDB  Interface</span></b><span style="font-size: 9pt;" lang="EN-US"> </span></td>
<td style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 78.9pt; padding-right: 5.4pt; height: 13.5pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0cm;" width="105"><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">OK</span></td>
</tr>
</tbody>
</table>
<p><span lang="EN-US">3.</span><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span lang="EN-US">Bug  status</span></p>
<table style="line-height: 14.25pt; background-color: white; width: 158pt; border-collapse: collapse; margin-left: 22.1pt;" class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="211">
<tbody>
<tr style="height: 13.5pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes;">
<td style="padding-bottom: 0cm; padding-left: 5.4pt; width: 90pt; padding-right: 5.4pt; background: silver; height: 13.5pt; padding-top: 0cm; border: windowtext 1pt solid;" width="120"><b><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">Total</span></b><span style="font-size: 9pt;" lang="EN-US"> </span></td>
<td style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 68pt; padding-right: 5.4pt; height: 13.5pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0cm;" width="91"><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">14</span><span style="font-size: 9pt;" lang="EN-US"> </span></td>
</tr>
<tr style="height: 13.5pt; mso-yfti-irow: 1;">
<td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; padding-left: 5.4pt; width: 90pt; padding-right: 5.4pt; background: silver; height: 13.5pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0cm;" width="120"><b><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">Closed</span></b><span style="font-size: 9pt;" lang="EN-US"> </span></td>
<td style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 68pt; padding-right: 5.4pt; height: 13.5pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0cm;" width="91"><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">14</span><span style="font-size: 9pt;" lang="EN-US"> </span></td>
</tr>
<tr style="height: 13.5pt; mso-yfti-irow: 2; mso-yfti-lastrow: yes;">
<td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; padding-left: 5.4pt; width: 90pt; padding-right: 5.4pt; background: silver; height: 13.5pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0cm;" width="120"><b><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">Postpone</span></b><span style="font-size: 9pt;" lang="EN-US"> </span></td>
<td style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 68pt; padding-right: 5.4pt; height: 13.5pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0cm;" width="91"><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">0</span></td>
</tr>
</tbody>
</table>
<p><span lang="EN-US">4.</span><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span lang="EN-US">Function  Testing</span></p>
<table style="line-height: 14.25pt; border: medium none; background-color: white; border-collapse: collapse; margin-left: 25.15pt;" class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="padding-bottom: 0cm; padding-left: 5.4pt; width: 3cm; padding-right: 5.4pt; padding-top: 0cm; border: black 1pt solid;" valign="top" width="113"><b><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">Total</span></b><span style="font-size: 9pt;" lang="EN-US"> </span></td>
<td style="border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 77.95pt; padding-right: 5.4pt; border-top: black 1pt solid; border-right: black 1pt solid; padding-top: 0cm; mso-border-left-alt: solid black 1.0pt;" valign="top" width="104"><b><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">Pass</span></b><span style="font-size: 9pt;" lang="EN-US"> </span></td>
<td style="border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 3cm; padding-right: 5.4pt; border-top: black 1pt solid; border-right: black 1pt solid; padding-top: 0cm; mso-border-left-alt: solid black 1.0pt;" valign="top" width="113"><b><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">Fail</span></b><span style="font-size: 9pt;" lang="EN-US"> </span></td>
<td style="border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 92.15pt; padding-right: 5.4pt; border-top: black 1pt solid; border-right: black 1pt solid; padding-top: 0cm; mso-border-left-alt: solid black 1.0pt;" valign="top" width="123"><b><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">Success  Rate</span></b><span style="font-size: 9pt;" lang="EN-US"> </span></td>
</tr>
<tr>
<td style="border-bottom: black 1pt solid; border-left: black 1pt solid; padding-bottom: 0cm; padding-left: 5.4pt; width: 3cm; padding-right: 5.4pt; border-top: medium none; border-right: black 1pt solid; padding-top: 0cm; mso-border-top-alt: solid black 1.0pt;" valign="top" width="113"><span style="font-size: 9pt;" lang="EN-US">236 </span></td>
<td style="border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 77.95pt; padding-right: 5.4pt; border-top: medium none; border-right: black 1pt solid; padding-top: 0cm; mso-border-left-alt: solid black 1.0pt; mso-border-top-alt: solid black 1.0pt;" valign="top" width="104"><span style="font-size: 9pt;" lang="EN-US">236 </span></td>
<td style="border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 3cm; padding-right: 5.4pt; border-top: medium none; border-right: black 1pt solid; padding-top: 0cm; mso-border-left-alt: solid black 1.0pt; mso-border-top-alt: solid black 1.0pt;" valign="top" width="113"><span style="font-size: 9pt;" lang="EN-US">0 </span></td>
<td style="border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 92.15pt; padding-right: 5.4pt; border-top: medium none; border-right: black 1pt solid; padding-top: 0cm; mso-border-left-alt: solid black 1.0pt; mso-border-top-alt: solid black 1.0pt;" valign="top" width="123"><span style="font-family: Cambria, serif; font-size: 9pt;" lang="EN-US">100%</span></td>
</tr>
</tbody>
</table>
<p><span lang="EN-US">5.</span><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span lang="EN-US">Issues</span></p>
<p><span lang="EN-US">&nbsp;</span></p>
<p>&nbsp; 1) Some CUBRID Date Type Name are not consistent with OLEDB Date Type Name. It may be ambiguous to users. We think it should be optimized. Please refer http://jira.cubrid.org/browse/APIS-30</p>
<p>&nbsp; 2) The CUBRID OLEDB Interface manual should describe the data type mapping between CUBRID and OLEDB, like the ODBC manual &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; http://www.cubrid.org/manual/91/en/api/odbc.html. It will help &nbsp; &nbsp;user to develop with OLEDB interface more easily</p>
<p>&nbsp; 3) Some properties value of db connection should be consistent with MSDN. It will help users use CUBRID more clearly. Such &nbsp; as http://jira.cubrid.org/browse/APIS-532&nbsp;</p>
<p>&nbsp;</p>
<ul>
</ul>]]></description>
                        <pubDate>Fri, 03 May 2013 18:37:57 -0800</pubDate>
                        <category>oledb</category>
                                </item>
        										        <item>
            <title>CUBRID ODBC Driver 9.1.0 Release Note</title>
            <dc:creator></dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-odbc-driver-9-1-0-release-note</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-odbc-driver-9-1-0-release-note</guid>
                                    <description><![CDATA[<table cellspacing="2" style="background: #cccccc;">
<tbody>
<tr style="background: #FFFFFF;">
<td>
<p><b>9.1.0</b></p>
</td>
<td>
<h3></h3>
<h3 style="width: 735px; margin: 10px 0px; font-size: 16px; font-family: Calibri, 'Times New Roman', Tahoma, sans-serif; background-color: #f4f7fa;">Functionality added or changed:</h3>
<p style="line-height: 20px; font-family: Calibri, 'Times New Roman', Arial, Tahoma; font-size: 15px; margin: 7px 0px; text-align: justify; color: #131212; font-weight: normal; background-color: #f4f7fa;">The following ODBC APIs are newly supported by CUBRID ODBC:</p>
<ul style="color: #131212; font-family: Calibri, 'Times New Roman', Arial, Tahoma; line-height: 20px; font-size: 15px; font-weight: normal; background-color: #f4f7fa;">
<li style="text-align: left;">SQLPrimaryKeys</li>
<li style="text-align: left;">SQLForeignKeys</li>
<li style="text-align: left;">SQLProcedures</li>
<li style="text-align: left;">SQLProcedureColumns</li>
<li style="text-align: left;">SQLTablePrivileges</li>
</ul>
<p style="line-height: 20px; font-family: Calibri, 'Times New Roman', Arial, Tahoma; font-size: 15px; margin: 7px 0px; text-align: justify; color: #131212; font-weight: normal; background-color: #f4f7fa;">All four functions are catalog functions, which can get schema information of database you connect to. CUBRID schema information is stored in system catalog table, so you can also get this information from system catalog virtual table using SQL statement.</p>
<p style="line-height: 20px; font-family: Calibri, 'Times New Roman', Arial, Tahoma; font-size: 15px; margin: 7px 0px; text-align: justify; color: #131212; font-weight: normal; background-color: #f4f7fa;">Database schema information is important for data modeling tools like&nbsp;<b>CA ERwin Data Modeler</b>, which enables you to visualize complex data structures. It uses schema information, for example, tables of database, columns and attributes of table, the primary and foreign keys of table, and relationships between tables and so on, to get the structure of the database.</p>
<p style="line-height: 20px; font-family: Calibri, 'Times New Roman', Arial, Tahoma; font-size: 15px; margin: 7px 0px; text-align: justify; color: #131212; font-weight: normal; background-color: #f4f7fa;">&nbsp;</p>
<ol style="color: #131212; font-family: Calibri, 'Times New Roman', Arial, Tahoma; line-height: 20px; font-size: 15px; font-weight: normal; background-color: #f4f7fa;">
<li style="text-align: left;">SQLPrimaryKeys returns the column names that make up the primary key for a table.</li>
<li style="text-align: left;">SQLForeignKeys can return:<ol>
<li style="text-align: left;">A list of foreign keys in the specified table (columns in the specified table that refer to primary keys in other tables).</li>
<li style="text-align: left;">A list of foreign keys in other tables that refer to the primary key in the specified table.</li>
</ol></li>
<li style="text-align: left;">SQLProcedures returns returns the list of function/procedure names stored in a specific data source.<ol>
<li style="text-align: left;">Stored functions/procedures are blocks of code that have a flow of commands for data manipulation and are easy to manipulate and administer. CUBRID supports to develop stored functions and procedures in Java. Java stored functions/procedures are executed on the JVM (Java Virtual Machine) hosted by CUBRID.</li>
</ol></li>
<li style="text-align: left;">SQLProcedureColumns returns the list of input and output parameters for the specified procedures, but not including the return columns.</li>
<li style="text-align: left;">SQLTablePrivileges returns a list of tables and the privileges associated with each table, which represents authorization information of the classes for which the current user has authorization in the database.</li>
</ol>
<p style="line-height: 20px; font-family: Calibri, 'Times New Roman', Arial, Tahoma; font-size: 15px; margin: 7px 0px; text-align: justify; color: #131212; font-weight: normal; background-color: #f4f7fa;">&nbsp;</p>
<h3 style="width: 735px; margin: 10px 0px; font-size: 16px; font-family: Calibri, 'Times New Roman', Tahoma, sans-serif; background-color: #f4f7fa;">Fixed bugs:</h3>
<p style="line-height: 20px; font-family: Calibri, 'Times New Roman', Arial, Tahoma; font-size: 15px; margin: 7px 0px; text-align: justify; color: #131212; font-weight: normal; background-color: #f4f7fa;">&nbsp;</p>
<ul style="color: #131212; font-family: Calibri, 'Times New Roman', Arial, Tahoma; line-height: 20px; font-size: 15px; font-weight: normal; background-color: #f4f7fa;">
<li style="text-align: left;">SQLFetchScroll: When parameter FetchOrientation is SQL_FETCH_LAST, SQLFetchScroll should return the last complete rowset in the result set. But it will return the first, not the last. 
<ul style="margin: 0px;">
<li style="text-align: left;">SQLFetchScroll is used to fetches the specified rowset of data from the result set and returns data for all bound columns. Rowsets can be specified at an absolute or relative position or by bookmark.</li>
</ul>
</li>
<li style="text-align: left;">SQLSetPos: Application will crash when calling SQLSetPos. 
<ul style="margin: 0px;">
<li style="text-align: left;">SQLSetPos sets the cursor position in a rowset and allows an application to refresh, update or delete data in the result set.</li>
</ul>
</li>
<li style="text-align: left;">SQLSetPos: The default value of statement attribute SQL_ATTR_ROW_ARRAY_SIZE is 1, which is the number of rows returned by each call to SQLFetch or SQLFetchScroll. If we set this attribute to value that is more than 1, SQLSetPos can't work correctly.</li>
<li style="text-align: left;">SQLStatistics and SQLSpecialColumns: The results of the two catalog functions are not valid.<br /><br />SQLStatistics retrieves a list of statistics about a single table and the indexes associated with the table. SQLSpecialColumns retrieves the following information about columns within a specified table: 
<ul style="margin: 0px;">
<li style="text-align: left;">When IdentifierType is SQL_BEST_ROWID, it will return information of columns that uniquely identifies a row in the table;</li>
<li style="text-align: left;">When IdentifierType is SQL_ROWVER, it will return information of columns that are automatically updated when any value in the row is updated by a transaction.<br /><br />No data type in CUBRID will auto-update, so it only can return the columns which compose the unique keys.</li>
</ul>
</li>
</ul>
</td>
</tr>
</tbody>
</table>]]></description>
                        <pubDate>Thu, 25 Apr 2013 23:23:11 -0800</pubDate>
                        <category>odbc</category>
                        <category>driver</category>
                                </item>
        										        <item>
            <title>CUBRID ODBC Driver 9.1.0.p1 Release Note</title>
            <dc:creator></dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-odbc-driver-9-1-0-p1-release-note</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-odbc-driver-9-1-0-p1-release-note</guid>
                                    <description><![CDATA[<table style="background: #cccccc;" cellspacing="2">
<tbody>
<tr style="background: #FFFFFF;">
<td>
<p><b>9.1.0.p1</b></p>
</td>
<td>
<h3>Changed and Enhanced Features:</h3>
<p>
<ul>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-184">APIS-184</a>] -  [ODBC]how to do auto_commit off in C#</li>
</ul>
</p>
<h3>Fixed bugs:</h3>
<p>
<ul>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-152">APIS-152</a>] - [ODBC]  한글 쿼리 실행 시 에러</li>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-155">APIS-155</a>] - CUBRID  ODBC Driver에서 SELECT 수행시 런타임 오류 발생</li>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-156">APIS-156</a>] - user  reported&gt; ODBC driver has a Fetch error </li>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-443">APIS-443</a>] - Fetch  error in using openrowset() call in sql server</li>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-445">APIS-445</a>] - sql  server core dump if openrowset() call on numeric field from ODBC driver</li>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-536">APIS-536</a>] - [ODBC]  The returned value of OdbcConnection.Database is incorrect</li>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-538">APIS-538</a>] - [ODBC]  A problem of the returned value of OdbcConnection.DataSource property</li>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-539">APIS-539</a>] - [ODBC]  OdbcDataReader.GetDataTypeName doesn't work</li>
<li>[<a href="http://www.jira.cubrid.org/browse/APIS-540">APIS-540</a>] - [ODBC]  OdbcDataReader GetInt16, GetInt32 doesn't returns expected exception when read  an overbound integer</li>
</ul>
</p>
</td>
</tr>
</tbody>
</table>]]></description>
                        <pubDate>Fri, 03 May 2013 18:30:17 -0800</pubDate>
                        <category>odbc</category>
                                </item>
        										        <item>
            <title>CUBRID ODBC 9.0.1.0.p1 QA Test Report</title>
            <dc:creator></dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-odbc-9-0-1-0-p1-qa-test-report</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-odbc-9-0-1-0-p1-qa-test-report</guid>
                                    <description><![CDATA[<p>&nbsp;</p>
<p>1. Test Info</p>
<ul>
<li>Driver Build: ODBC 9.1</li>
<li>Server Build: CUBRID 9.1 (9.1.0.0212) (64bit release build for linux_gnu)</li>
<li>Test Platform: Windows7 32bit, Windows XP 32bit, Windows2003 64bit</li>
<li>.Net Framework: 3.5</li>
</ul>
<p>2.Test Results</p>
<table style="line-height: 14.25pt; background-color: white; width: 168.9pt; border-collapse: collapse; margin-left: 22.1pt;" class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="225">
<tbody>
<tr style="height: 13.5pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes;">
<td style="padding-bottom: 0cm; padding-left: 5.4pt; width: 90pt; padding-right: 5.4pt; background: silver; height: 13.5pt; padding-top: 0cm; border: windowtext 1pt solid;" width="120">
<p style="margin: 0cm 0cm 0pt;"><b><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">ODBC  Interface</span></b><span style="font-size: 9pt;" lang="EN-US"> </span></p>
</td>
<td style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 78.9pt; padding-right: 5.4pt; height: 13.5pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0cm;" width="105">
<p style="margin: 0cm 0cm 0pt;"><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">&nbsp; &nbsp; &nbsp;OK</span></p>
</td>
</tr>
</tbody>
</table>
<p>3.Bug status</p>
<table style="line-height: 14.25pt; background-color: white; width: 158pt; border-collapse: collapse; margin-left: 22.1pt;" class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="211">
<tbody>
<tr style="height: 13.5pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes;">
<td style="padding-bottom: 0cm; padding-left: 5.4pt; width: 90pt; padding-right: 5.4pt; background: silver; height: 13.5pt; padding-top: 0cm; border: windowtext 1pt solid;" width="120">
<p style="margin: 0cm 0cm 0pt;"><b><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">&nbsp; &nbsp; &nbsp;Total</span></b><span style="font-size: 9pt;" lang="EN-US"> </span></p>
</td>
<td style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 68pt; padding-right: 5.4pt; height: 13.5pt; border-top: windowtext 1pt solid; border-right: windowtext 1pt solid; padding-top: 0cm;" width="91">
<p style="text-align: center; margin: 0cm 0cm 0pt;" align="center"><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">14</span><span style="font-size: 9pt;" lang="EN-US"> </span></p>
</td>
</tr>
<tr style="height: 13.5pt; mso-yfti-irow: 1;">
<td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; padding-left: 5.4pt; width: 90pt; padding-right: 5.4pt; background: silver; height: 13.5pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0cm;" width="120">
<p style="margin: 0cm 0cm 0pt;"><b><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">&nbsp; &nbsp; &nbsp;Closed</span></b><span style="font-size: 9pt;" lang="EN-US"> </span></p>
</td>
<td style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 68pt; padding-right: 5.4pt; height: 13.5pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0cm;" width="91">
<p style="text-align: center; margin: 0cm 0cm 0pt;" align="center"><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">14</span><span style="font-size: 9pt;" lang="EN-US"> </span></p>
</td>
</tr>
<tr style="height: 13.5pt; mso-yfti-irow: 2; mso-yfti-lastrow: yes;">
<td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; padding-left: 5.4pt; width: 90pt; padding-right: 5.4pt; background: silver; height: 13.5pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0cm;" width="120">
<p style="margin: 0cm 0cm 0pt;"><b><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">&nbsp; &nbsp; &nbsp;Postpone</span></b><span style="font-size: 9pt;" lang="EN-US"> </span></p>
</td>
<td style="border-bottom: windowtext 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 68pt; padding-right: 5.4pt; height: 13.5pt; border-top: medium none; border-right: windowtext 1pt solid; padding-top: 0cm;" width="91">
<p style="text-align: center; margin: 0cm 0cm 0pt;" align="center"><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">0</span><span style="background-color: white; font-size: 10pt; line-height: 14.25pt; text-indent: -18pt;">&nbsp;&nbsp;</span></p>
</td>
</tr>
</tbody>
</table>
<p><span lang="EN-US">4. Function Testing</span></p>
<table style="background-color: white; border-collapse: collapse; margin-left: 2pt; border-width: 1px; border-style: none;" class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td style="padding-bottom: 0cm; padding-left: 5.4pt; width: 3cm; padding-right: 5.4pt; padding-top: 0cm; border: black 1pt solid;" valign="top" width="113">
<p style="margin: 0cm 0cm 0pt;"><b><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">Total</span></b></p>
</td>
<td style="border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 77.95pt; padding-right: 5.4pt; border-top: black 1pt solid; border-right: black 1pt solid; padding-top: 0cm; mso-border-left-alt: solid black 1.0pt;" valign="top" width="104">
<p style="margin: 0cm 0cm 0pt;"><b><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">Pass</span></b></p>
</td>
<td style="border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 3cm; padding-right: 5.4pt; border-top: black 1pt solid; border-right: black 1pt solid; padding-top: 0cm; mso-border-left-alt: solid black 1.0pt;" valign="top" width="113">
<p style="margin: 0cm 0cm 0pt;"><b><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">Fail</span></b></p>
</td>
<td style="border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 92.15pt; padding-right: 5.4pt; border-top: black 1pt solid; border-right: black 1pt solid; padding-top: 0cm; mso-border-left-alt: solid black 1.0pt;" valign="top" width="123">
<p style="margin: 0cm 0cm 0pt;"><b><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US">Success  Rate</span></b></p>
<p style="margin: 0cm 0cm 0pt;"><b><span style="font-family: Tahoma, sans-serif; font-size: 9pt;" lang="EN-US"><br /></span></b></p>
</td>
</tr>
<tr>
<td style="border-bottom: black 1pt solid; border-left: black 1pt solid; padding-bottom: 0cm; padding-left: 5.4pt; width: 3cm; padding-right: 5.4pt; border-top: medium none; border-right: black 1pt solid; padding-top: 0cm; mso-border-top-alt: solid black 1.0pt;" valign="top" width="113">
<p style="margin: 0cm 0cm 0pt;"><span style="font-size: 9pt;" lang="EN-US">271</span></p>
<p style="margin: 0cm 0cm 0pt;"><span style="font-size: 9pt;" lang="EN-US"><br /></span></p>
</td>
<td style="border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 77.95pt; padding-right: 5.4pt; border-top: medium none; border-right: black 1pt solid; padding-top: 0cm; mso-border-left-alt: solid black 1.0pt; mso-border-top-alt: solid black 1.0pt;" valign="top" width="104">
<p style="margin: 0cm 0cm 0pt;"><span style="font-size: 9pt;" lang="EN-US">271</span></p>
</td>
<td style="border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 3cm; padding-right: 5.4pt; border-top: medium none; border-right: black 1pt solid; padding-top: 0cm; mso-border-left-alt: solid black 1.0pt; mso-border-top-alt: solid black 1.0pt;" valign="top" width="113">
<p style="margin: 0cm 0cm 0pt;"><span style="font-size: 9pt;" lang="EN-US">0</span></p>
</td>
<td style="border-bottom: black 1pt solid; border-left: medium none; padding-bottom: 0cm; padding-left: 5.4pt; width: 92.15pt; padding-right: 5.4pt; border-top: medium none; border-right: black 1pt solid; padding-top: 0cm; mso-border-left-alt: solid black 1.0pt; mso-border-top-alt: solid black 1.0pt;" valign="top" width="123">
<p style="margin: 0cm 0cm 0pt;"><span style="font-family: Cambria, serif; font-size: 9pt;" lang="EN-US">100%</span></p>
</td>
</tr>
</tbody>
</table>
<p>5. &nbsp;Issues</p>
<p><span style="white-space: pre;"> </span>None</p>]]></description>
                        <pubDate>Fri, 03 May 2013 17:47:31 -0800</pubDate>
                        <category>odbc</category>
                        <category>Driver</category>
                                </item>
        										        <item>
            <title>QA OK Sign - CUBRID ODBC Driver</title>
            <dc:creator></dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=qa-ok-sign-cubrid-odbc-driver</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=qa-ok-sign-cubrid-odbc-driver</guid>
                                    <description><![CDATA[<ul>
<li>[CUBRID ODBC 9.0.1.0.p1 QA Test Report]</li>
</ul>]]></description>
                        <pubDate>Thu, 25 Apr 2013 23:31:46 -0800</pubDate>
                        <category>odbc</category>
                        <category>driver</category>
                                </item>
        										        <item>
            <title>CUBRID JDBC Maven Repository</title>
            <dc:creator>Laura Oh</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-jdbc-maven-repository</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-jdbc-maven-repository</guid>
                                    <description><![CDATA[<p>[CUBRID JDBC Driver|CUBRID JDBC] is an API that allows users to connect to CUBRID database within applications written in Java.</p>
<p>In order to add CUBRID JDBC driver to your maven project, add the following <b>dependency</b> to your project's <b>pom.xml</b> file:</p>
<div nocontrols="false" nogutter="false" collapse="false" first_line="1" code_type="Xml" editor_component="code_highlighter" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">&lt;dependency&gt;<br /> &lt;groupId&gt;cubrid&lt;/groupId&gt;<br /> &lt;artifactId&gt;cubrid-jdbc&lt;/artifactId&gt;<br /> &lt;version&gt;8.4.3.1005&lt;/version&gt;<br />&lt;/dependency&gt;</div>
<p><b> </b></p>
<p>Remember to indicate the appropriate <b>version number</b>. The list of available versions can be found at <a href="http://maven.cubrid.org/cubrid/cubrid-jdbc/" target="_self">http://maven.cubrid.org/cubrid/cubrid-jdbc/</a>.</p>
<p>You should also add the <b>repository information</b> into your <b>pom.xml</b> file:</p>
<div nocontrols="false" nogutter="false" collapse="false" first_line="1" code_type="Xml" editor_component="code_highlighter" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">&lt;repository&gt;   <br /> &lt;id&gt;CUBRID&lt;/id&gt;<br /> &lt;name&gt;CUBRID-releases&lt;/name&gt;<br /> &lt;url&gt;http://maven.cubrid.org&lt;/url&gt;<br /> &lt;/repository&gt;</div>
<p>This concludes the maven tutorial. If you have any question, please post it on our <a href="/questions" target="_self">Q&amp;A Site</a> or on our <a href="/forum" target="_self">forum</a>.</p>]]></description>
                        <pubDate>Wed, 25 Apr 2012 17:31:11 -0800</pubDate>
                        <category>jdbc</category>
                        <category>Maven</category>
                        <category>tutorial</category>
                                </item>
        										        <item>
            <title>Compiling the CUBRID OLE DB installer</title>
            <dc:creator></dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=compiling-the-cubrid-ole-db-installer</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=compiling-the-cubrid-ole-db-installer</guid>
                                    <description><![CDATA[<p>&nbsp;</p>
<h2>Introduction</h2>
<p>The CUBRID OLE DB installer is open-source code, BSD licensed and built using NSIS.</p>
<p><a target="_self" href="http://nsis.sourceforge.net/Main_Page">NSIS</a> (Nullsoft Scriptable Install System) is a professional open source system for creating Windows installers.&nbsp;It is designed to be as small and flexible as possible and is therefore very suitable for internet distribution.</p>
<p>We choosed NSIS because it is widely used in open source projects, it is script-based and allows us to create the logic to handle even the most complex installation tasks.&nbsp;</p>
<h2>Updating and compiling the installer</h2>
<p>The source code for CUBRID OLEDB Installer is located in the CUBRID SVN repository:<br /><a target="_self" href="http://svn.cubrid.org/cubridapis/oledb/branches/RB-8.4.1/Installer/CUBRID%20OLEDB%20Provider.nsi">http://svn.cubrid.org/cubridapis/oledb/branches/RB-xxx/installer/installer.nsi</a></p>
<p>If you want to compile the installer yourself, (and maybe change it,) we recommend the followings:</p>
<p>&nbsp;</p>
<ul>
<li>Download the installer script source code - see the above specified location</li>
<li>Update the script, if needed; we recommend using <a target="_self" href="http://hmne.sourceforge.net/">HM NIS Edit</a> tool.<br /><br />"HM NIS Edit is the best Editor/IDE for Nullsoft Scriptable Install System (NSIS). Its useful for experts and beginners in the creation of Setup programs with the NSIS. Its Script Wizard will help you to create standard Setup programs with only few clicks, also its InstallOptions designer will help you to create your own custom pages with a friendly drag and drop interface."</li>
<li>Compile the installer. (If you use HM NIS Edit it is just a matter of clicking a toolbar button.)</li>
</ul>
<p>&nbsp;</p>
<blockquote class="q4">
<p><b>Notes:</b></p>
<p>By default, the installer script code is for creating the x32 installer. If you want to create the x64 installer,</p>
<p>please update the installer script first by commenting/uncommenting the appropiate lines of code (just search for "<b>64</b>" in the script).</p>
</blockquote>]]></description>
                        <pubDate>Sun, 10 Jun 2012 17:12:15 -0800</pubDate>
                        <category>oledb</category>
                        <category>api</category>
                        <category>build instructions</category>
                        <category>tutorial</category>
                                </item>
        										        <item>
            <title>OLEDB Connection String</title>
            <dc:creator></dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=oledb-connection-string</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=oledb-connection-string</guid>
                                    <description><![CDATA[<p>The first thing we need to know in order to create a CUBRID connection is to how to build the connection string.</p>
<p>Looking into the CUBRID documentation (<a href="/manual/841/en/Configuring%20Connection%20Strings" target="_self">http://www.cubrid.org/manual/841/en/Configuring%20Connection%20Strings</a>), you will find out that in order touse the CUBRID OLE DB Provider, the connection string must be built using the following "pieces":</p>
<table>
<thead> 
<tr>
<td>Item</td>
<td>Exampe/Value</td>
<td>Description</td>
</tr>
</thead> 
<tbody>
<tr>
<td>Provider</td>
<td><strong>CUBRIDProvider</strong></td>
<td>Provider name. Do not change this value.</td>
</tr>
<tr>
<td>Data Source</td>
<td>demodb</td>
<td>Database name.</td>
</tr>
<tr>
<td>Location</td>
<td>127.0.0.1 (or "localhost")</td>
<td>The IP address of the CUBRID Broker Server.</td>
</tr>
<tr>
<td>User Id</td>
<td>dba</td>
<td>Database username.</td>
</tr>
<tr>
<td>Password</td>
<td>xxxxxx</td>
<td>User password.</td>
</tr>
<tr>
<td>Port</td>
<td>30000</td>
<td>Broker port number (typically 30000 or 33000, for more info see <a href="/wiki_tutorials/entry/connecting-to-a-remote-cubrid-database">Connecting to a remote CUBRID Database</a>).</td>
</tr>
</tbody>
</table>
<p>For example, to connect to the <b>demodb</b> database, using the <b>public</b> user, on a local CUBRID installation, the connection string will be:</p>
<div editor_component="code_highlighter" code_type="CSharp" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">&nbsp;Provider=CUBRIDProvider;Location=localhost;Data Source=demodb;User Id=public;Port=33000</div>
<p>Please note that in the next provider releases, you will be able to specify in the connection string additional information such as:</p>
<ul>
<li>Connection encoding</li>
<li>Auto-commit mode</li>
</ul>]]></description>
                        <pubDate>Mon, 23 Apr 2012 05:02:48 -0800</pubDate>
                        <category>cubrid</category>
                        <category>oledb</category>
                        <category>connection string</category>
                                </item>
        										        <item>
            <title>CUBRID Ruby API Documentation</title>
            <dc:creator>CUBRID</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-ruby-api-documentation</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-ruby-api-documentation</guid>
                                    <description><![CDATA[<table summary="Contents" class="toc">
<tbody>
<tr>
<td>
<div id="toctitle" style="text-align: center;">
<h2>Contents</h2>
</div>
<ul>
<li class="toclevel-1"><a href="#Overview"><span class="tocnumber">1</span>&nbsp;<span class="toctext">Overview</span></a></li>
<li class="toclevel-1"><a href="#Getting_Help"><span class="tocnumber">2</span>&nbsp;<span class="toctext">Getting Help</span></a></li>
<li class="toclevel-1"><a href="#Preparing_the_Environment"><span class="tocnumber">3</span>&nbsp;<span class="toctext">Preparing the Environment</span></a> 
<ul>
<li class="toclevel-2"><a href="#Preparing_CUBRID"><span class="tocnumber">3.1</span>&nbsp;<span class="toctext">Preparing CUBRID</span></a></li>
<li class="toclevel-2"><a href="#Preparing_Ruby"><span class="tocnumber">3.2</span>&nbsp;<span class="toctext">Preparing Ruby</span></a> 
<ul>
<li class="toclevel-3"><a href="#On_Windows"><span class="tocnumber">3.2.1</span>&nbsp;<span class="toctext">On Windows</span></a> 
<ul>
<li class="toclevel-4"><a href="#Install_Ruby"><span class="tocnumber">3.2.1.1</span>&nbsp;<span class="toctext">Install Ruby</span></a></li>
<li class="toclevel-4"><a href="#Install_Ruby_Driver_for_CUBRID"><span class="tocnumber">3.2.1.2</span>&nbsp;<span class="toctext">Install Ruby Driver for CUBRID</span></a></li>
</ul>
</li>
<li class="toclevel-3"><a href="#On_Linux"><span class="tocnumber">3.2.2</span>&nbsp;<span class="toctext">On Linux</span></a> 
<ul>
<li class="toclevel-4"><a href="#Install_Ruby_2"><span class="tocnumber">3.2.2.1</span>&nbsp;<span class="toctext">Install Ruby</span></a></li>
<li class="toclevel-4"><a href="#Install_Ruby_Driver_for_CUBRID_2"><span class="tocnumber">3.2.2.2</span>&nbsp;<span class="toctext">Install Ruby Driver for CUBRID</span></a> 
<ul>
<li class="toclevel-5"><a href="#Install_Ruby_Gem"><span class="tocnumber">3.2.2.2.1</span>&nbsp;<span class="toctext">Install Ruby Gem</span></a></li>
<li class="toclevel-5"><a href="#Manually_Build_the_Library"><span class="tocnumber">3.2.2.2.2</span>&nbsp;<span class="toctext">Manually Build the Library</span></a></li>
<li class="toclevel-5"><a href="#Example"><span class="tocnumber">3.2.2.2.3</span>&nbsp;<span class="toctext">Example</span></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toclevel-1"><a href="#Ruby_API"><span class="tocnumber">4</span>&nbsp;<span class="toctext">Ruby API</span></a> 
<ul>
<li class="toclevel-2" style="margin-bottom: 0.1em;"><a href="#Connection_Class"><span class="tocnumber">4.1</span>&nbsp;<span class="toctext">Connection Class</span></a> 
<ul>
<li class="toclevel-3"><a href="#Data_Constants"><span class="tocnumber">4.1.1</span>&nbsp;<span class="toctext">Data Constants</span></a></li>
<li class="toclevel-3"><a href="#auto_commit.3D"><span class="tocnumber">4.1.2</span>&nbsp;<span class="toctext">auto_commit=</span></a></li>
<li class="toclevel-3"><a href="#auto_commit.3F"><span class="tocnumber">4.1.3</span>&nbsp;<span class="toctext">auto_commit?</span></a></li>
<li class="toclevel-3"><a href="#connect"><span class="tocnumber">4.1.4</span>&nbsp;<span class="toctext">connect</span></a></li>
<li class="toclevel-3"><a href="#close"><span class="tocnumber">4.1.5</span>&nbsp;<span class="toctext">close</span></a></li>
<li class="toclevel-3"><a href="#commit"><span class="tocnumber">4.1.6</span>&nbsp;<span class="toctext">commit</span></a></li>
<li class="toclevel-3"><a href="#rollback"><span class="tocnumber">4.1.7</span>&nbsp;<span class="toctext">rollback</span></a></li>
<li class="toclevel-3"><a href="#glo_new"><span class="tocnumber">4.1.8</span>&nbsp;<span class="toctext">glo_new</span></a></li>
<li class="toclevel-3"><a href="#query"><span class="tocnumber">4.1.9</span>&nbsp;<span class="toctext">query</span></a></li>
<li class="toclevel-3"><a href="#prepare"><span class="tocnumber">4.1.10</span>&nbsp;<span class="toctext">prepare</span></a></li>
<li class="toclevel-3"><a href="#to_s"><span class="tocnumber">4.1.11</span>&nbsp;<span class="toctext">to_s</span></a></li>
<li class="toclevel-3"><a href="#server_version"><span class="tocnumber">4.1.12</span>&nbsp;<span class="toctext">server_version</span></a></li>
</ul>
</li>
<li class="toclevel-2"><a href="#Statement_Class"><span class="tocnumber">4.2</span>&nbsp;<span class="toctext">Statement Class</span></a> 
<ul>
<li class="toclevel-3"><a href="#Data_Types"><span class="tocnumber">4.2.1</span>&nbsp;<span class="toctext">Data Types</span></a></li>
<li class="toclevel-3"><a href="#affected_rows"><span class="tocnumber">4.2.2</span>&nbsp;<span class="toctext">affected_rows</span></a></li>
<li class="toclevel-3"><a href="#bind"><span class="tocnumber">4.2.3</span>&nbsp;<span class="toctext">bind</span></a></li>
<li class="toclevel-3"><a href="#close_2"><span class="tocnumber">4.2.4</span>&nbsp;<span class="toctext">close</span></a></li>
<li class="toclevel-3"><a href="#column_info"><span class="tocnumber">4.2.5</span>&nbsp;<span class="toctext">column_info</span></a></li>
<li class="toclevel-3"><a href="#each"><span class="tocnumber">4.2.6</span>&nbsp;<span class="toctext">each</span></a></li>
<li class="toclevel-3"><a href="#each_hash"><span class="tocnumber">4.2.7</span>&nbsp;<span class="toctext">each_hash</span></a></li>
<li class="toclevel-3"><a href="#execute"><span class="tocnumber">4.2.8</span>&nbsp;<span class="toctext">execute</span></a></li>
<li class="toclevel-3"><a href="#fetch"><span class="tocnumber">4.2.9</span>&nbsp;<span class="toctext">fetch</span></a></li>
<li class="toclevel-3"><a href="#fetch_hash"><span class="tocnumber">4.2.10</span>&nbsp;<span class="toctext">fetch_hash</span></a></li>
<li class="toclevel-3"><a href="#get_oid"><span class="tocnumber">4.2.11</span>&nbsp;<span class="toctext">get_oid</span></a></li>
</ul>
</li>
<li class="toclevel-2"><a href="#Oid_Class"><span class="tocnumber">4.3</span>&nbsp;<span class="toctext">Oid Class</span></a> 
<ul>
<li class="toclevel-3"><a href="#.5B.5D.28col_name.29"><span class="tocnumber">4.3.1</span>&nbsp;<span class="toctext">[!](col_name)</span></a></li>
<li class="toclevel-3"><a href="#.5B.5D.3D.28col_name.2C_obj.29"><span class="tocnumber">4.3.2</span>&nbsp;<span class="toctext">[!]=(col_name, obj)</span></a></li>
<li class="toclevel-3"><a href="#drop"><span class="tocnumber">4.3.3</span>&nbsp;<span class="toctext">drop</span></a></li>
<li class="toclevel-3"><a href="#each_2"><span class="tocnumber">4.3.4</span>&nbsp;<span class="toctext">each</span></a></li>
<li class="toclevel-3"><a href="#lock"><span class="tocnumber">4.3.5</span>&nbsp;<span class="toctext">lock</span></a></li>
<li class="toclevel-3"><a href="#refresh"><span class="tocnumber">4.3.6</span>&nbsp;<span class="toctext">refresh</span></a></li>
<li class="toclevel-3"><a href="#save"><span class="tocnumber">4.3.7</span>&nbsp;<span class="toctext">save</span></a></li>
<li class="toclevel-3"><a href="#table"><span class="tocnumber">4.3.8</span>&nbsp;<span class="toctext">table</span></a></li>
<li class="toclevel-3"><a href="#to_hash"><span class="tocnumber">4.3.9</span>&nbsp;<span class="toctext">to_hash</span></a></li>
<li class="toclevel-3"><a href="#to_s_2"><span class="tocnumber">4.3.10</span>&nbsp;<span class="toctext">to_s</span></a></li>
</ul>
</li>
</ul>
</li>
<li class="toclevel-1"><a href="#See_also"><span class="tocnumber">5</span>&nbsp;<span class="toctext">See also</span></a></li>
</ul>
</td>
</tr>
</tbody>
</table>
<p><a name="Overview" id="Overview"></a></p>
<h2 style="padding-left: 60px;"><span class="mw-headline">Overview</span></h2>
<p>This tutorial will explain all steps that you need to perform in order to connect to CUBRID Database and run SQL statements through Ruby programming language.</p>
<p>At any time if you feel lost somewhere, you can always visit the main page for&nbsp;<a rel="nofollow" href="/cubrid_ruby_programming" title="cubrid_ruby_programming" class="external text">Ruby Programming</a>&nbsp;to start from the beginning.</p>
<p><a name="Getting_Help" id="Getting_Help"></a></p>
<h2 style="padding-left: 60px;"><span class="mw-headline">Getting Help</span></h2>
<p>If you have any troubles connecting to CUBRID through Ruby, post your questions to&nbsp;<a rel="nofollow" href="/forum/category/195536" title="CUBRID Ruby Forum" class="external text">Ruby Forum</a>&nbsp;at&nbsp;<a rel="nofollow" href="/forum" title="CUBRID Forum" class="external free">http://www.cubrid.org/forum</a>.</p>
<p><a name="Preparing_the_Environment" id="Preparing_the_Environment"></a></p>
<h2 style="padding-left: 60px;"><span class="mw-headline">Preparing the Environment</span></h2>
<p><a name="Preparing_CUBRID" id="Preparing_CUBRID"></a></p>
<h3 style="padding-left: 30px;"><span class="mw-headline">Preparing CUBRID</span></h3>
<ol>
<li>First thing you have to do is to make sure you have installed CUBRID Database according to all the steps explained in&nbsp;<a href="/installation_guide" title="Install CUBRID">Install CUBRID</a>. If you have not installed CUBRID yet,&nbsp;<a href="/?mid=downloads&amp;item=cubrid&amp;os=detect&amp;cubrid=9.1.0" title="Download CUBRID">Download CUBRID</a>&nbsp;and follow the&nbsp;<a href="/installation_guide" title="Install CUBRID">Installation Instructions</a>. In this tutorial I will be using the latest stable release CUBRID 9.1.0. On my machine it is installed in&nbsp;<b>C:CUBRID</b>. However, you do not have to worry much about it, as the CUBRID Installer automatically adds its location path to the Windows environment.</li>
<li><i>NOTE For Windows users</i>: Make sure you have installed&nbsp;<b>Java Development Kit (JDK)</b>&nbsp;and&nbsp;<b>Microsoft C++ 2008 Redistributable Package</b>.</li>
</ol>
<p><a name="Preparing_Ruby" id="Preparing_Ruby"></a></p>
<h3 style="padding-left: 30px;"><span class="mw-headline">Preparing Ruby</span></h3>
<p><img width="699" height="123" editor_component="image_link" src="/files/attach/images/194379/654/252/Gem_install_cubrid_web.png" alt="Gem_install_cubrid_web.png" /></p>
<p><a name="On_Windows" id="On_Windows"></a></p>
<h4 style="padding-left: 60px;"><span class="mw-headline">On Windows</span></h4>
<p><a name="Install_Ruby" id="Install_Ruby"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">Install Ruby</span></h4>
<p>You can download Ruby Installer from various places. I prefer to Download&nbsp;<b>Ruby Installer</b>&nbsp;from&nbsp;<a rel="nofollow" href="http://rubyinstaller.org/" title="http://rubyinstaller.org" class="external free">http://rubyinstaller.org</a>. At this point you will see me using pure Ruby 1.8.7-p299. Currently Ruby 1.9.1 is not supported, as the Ruby Driver for CUBRID has been compiled in the 1.8.7 environment. But we have already started building for 1.9.1, so it will be available soon.</p>
<p><a name="Install_Ruby_Driver_for_CUBRID" id="Install_Ruby_Driver_for_CUBRID"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">Install Ruby Driver for CUBRID</span></h4>
<p>If you have installed the above mentioned Ruby 1.8.7-p299, you should already have RubyGem installed. RubyGem is required to install additional external packages such as CUBRID Database driver, ActiveRecord, and other similar extensions. In order to install the Ruby Driver for CUBRID, in the command line type&nbsp;<code style="background-color: #f9f9f9;">gem install cubrid</code>&nbsp;as shown below.</p>
<pre class="bash"><div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Bash" editor_component="code_highlighter">C:&#92;Ruby&gt;&nbsp;gem&nbsp;install&nbsp;cubrid<br />
Successfully&nbsp;installed&nbsp;cubrid-0.65-x86-mingw32<br />
1&nbsp;gem&nbsp;installed<br />
Installing&nbsp;ri&nbsp;documentation&nbsp;for&nbsp;cubrid-0.65-x86-mingw32...<br />
Installing&nbsp;RDoc&nbsp;documentation&nbsp;for&nbsp;cubrid-0.65-x86-mingw32...</div></pre>
<p>At this point you should see the message about the successful installation of&nbsp;<i>cubrid-0.65-x86-mingw32</i>&nbsp;driver. The Ruby Driver provides the same functions as the original CUBRID CCI (C Interface) Library does. Below you will see sample tests which illustrate how to communicate with the CUBRID Database.</p>
<p><a name="On_Linux" id="On_Linux"></a></p>
<h4 style="padding-left: 60px;"><span class="mw-headline">On Linux</span></h4>
<p><a name="Install_Ruby_2" id="Install_Ruby_2"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">Install Ruby</span></h4>
<p>In order to install Ruby, we will use the generic Linux command. In this tutorial we will work under Ubuntu 10.4, and install Ruby 1.8.7. Type the following command to get Ruby and other necessary packages installed together.</p>
<pre class="bash"><div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Bash" editor_component="code_highlighter">sudo&nbsp;apt-get&nbsp;-y&nbsp;install&nbsp;ruby1.8-dev&nbsp;ruby1.8&nbsp;ri1.8&nbsp;rdoc1.8&nbsp;irb1.8&nbsp;libreadline-ruby1.8&nbsp;libruby1.8&nbsp;libopenssl-ruby&nbsp;rubygems1.8<br />
sudo&nbsp;ln&nbsp;-s&nbsp;/usr/bin/ruby1.8&nbsp;/usr/bin/ruby<br />
sudo&nbsp;ln&nbsp;-s&nbsp;/usr/bin/rdoc1.8&nbsp;/usr/bin/rdoc<br />
sudo&nbsp;ln&nbsp;-s&nbsp;/usr/bin/irb1.8&nbsp;/usr/bin/irb<br />
sudo&nbsp;ln&nbsp;-s&nbsp;/usr/bin/ri1.8&nbsp;/usr/bin/ri</div></pre>
<p>The first line indicates which packages should be installed. Notice that I am installing Ruby 1.8 version. At this moment Ruby 1.9.1 is not supported. But we have already started building for 1.9.1, so it will be available soon. The rest four lines create symbol links so that you are able to run the commands link "ruby", "rdoc", "irb", and "ri". Actually, you will need only the first one.</p>
<p><a name="Install_Ruby_Driver_for_CUBRID_2" id="Install_Ruby_Driver_for_CUBRID_2"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">Install Ruby Driver for CUBRID</span></h4>
<p>On Linux there are two ways to get Ruby Driver for CUBRID installed.</p>
<ol>
<li>Install Ruby Gem.</li>
<li>Manually compile the code and install the library.</li>
</ol>
<p><a name="Install_Ruby_Gem" id="Install_Ruby_Gem"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">Install Ruby Gem</span></h4>
<ul>
<li>CUBRID gem has been successfully pushed to RubyGems.org. So, now on Linux users can get CUBRID connector through&nbsp;<b>gem</b>.</li>
<li>Add the&nbsp;<b>-E</b>&nbsp;flag when installing the gem with&nbsp;<b>sudo</b>&nbsp;like "<b>sudo -E gem install cubrid</b>". The -E flag is necessary to make sure sudo does not reset the user path where CUBRID Database has been installed.</li>
</ul>
<p><a name="Manually_Build_the_Library" id="Manually_Build_the_Library"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">Manually Build the Library</span></h4>
<ul>
<li><a rel="nofollow" href="http://sourceforge.net/projects/cubrid/files/CUBRID-Drivers/Ruby_Driver/8.3.0/cubrid-ruby-driver-src.zip/download" title="http://sourceforge.net/projects/cubrid/files/CUBRID-Drivers/Ruby_Driver/8.3.0/cubrid-ruby-driver-src.zip/download" class="external text">Download source code</a>&nbsp;of Ruby Driver for CUBRID.</li>
<li>Extract, then run the following command in the terminal, which means that you are running the Ruby code within extconf.rb file. It will create a&nbsp;<i>Makefile</i>.</li>
</ul>
<pre class="bash"><div editor_component="code_highlighter" code_type="Bash" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">ruby&nbsp;extconf.rb</div></pre>
<ul>
<li>After the&nbsp;<i>Makefile</i>&nbsp;has been successfully created, type the following command to install the driver in your system.</li>
</ul>
<pre class="bash"><div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Bash" editor_component="code_highlighter">make&nbsp;install</div></pre>
<p>That's all! To see if everything has successfully been installed, print out the CUBRID Database version. Remember that in order to connect to a certain database, you have to first start that database. Otherwise, you will receive an error.</p>
<p><a name="Example" id="Example"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">Example</span></h4>
<p>Create a file called "testcubrid.rb" and paste the following Ruby code.</p>
<pre class="ruby"><div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Ruby" editor_component="code_highlighter">require&nbsp;'rubygems'<br />require&nbsp;'cubrid'<br />db&nbsp;=&nbsp;'demodb'<br />con&nbsp;=&nbsp;Cubrid.connect(db)<br />if&nbsp;con<br />	puts&nbsp;"connection&nbsp;established"<br />	puts&nbsp;"CUBRID&nbsp;Database&nbsp;version&nbsp;is:&nbsp;#{con.server_version}"<br />	con.close()<br />else<br />	puts&nbsp;"Connection&nbsp;could&nbsp;not&nbsp;be&nbsp;established"<br />end</div></pre>
<p>Then type the following commands in the terminal.</p>
<pre class="bash"><div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Bash" editor_component="code_highlighter">cubrid&nbsp;service&nbsp;start<br />cubrid&nbsp;server&nbsp;start&nbsp;demodb<br />ruby&nbsp;--rubygems testcubrid.rb</div></pre>
<ol>
<li>The first line will start CUBRID services.</li>
<li>The second line will start the database called "demodb".</li>
<li>The third line will run the Ruby code inside "testcurbid.rb" file.</li>
</ol>
<p>You should see the following output.</p>
<pre class="bash">connection established
CUBRID Database version is: 8.2.2.0261</pre>
<p><a name="Ruby_API" id="Ruby_API"></a></p>
<h2 style="padding-left: 90px;"><span class="mw-headline">Ruby API</span></h2>
<p><a name="Connection_Class" id="Connection_Class"></a></p>
<h3 style="padding-left: 60px;"><span class="mw-headline">Connection Class</span></h3>
<p><a name="Data_Constants" id="Data_Constants"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">Data Constants</span></h4>
<p>Description</p>
<p>The following Data Types represent the&nbsp;<b>Cubrid</b>&nbsp;class data type constants declared in the Ruby API.</p>
<p>Syntax</p>
<pre class="ruby"><span style="color: #6666ff; font-weight: bold;">Cubrid::DATE</span></pre>
<table border="1" style="line-height: 19px; font-family: sans-serif; border-collapse: collapse; background-color: #ffffaa;">
<tbody>
<tr style="text-align: center; font-weight: bold;">
<td style="width: 200px;">Support Data Type Constants</td>
</tr>
<tr>
<td>CHAR</td>
</tr>
<tr>
<td>VARCHAR</td>
</tr>
<tr>
<td>STRING</td>
</tr>
<tr>
<td>NCHAR</td>
</tr>
<tr>
<td>VARNCHAR</td>
</tr>
<tr>
<td>BIT</td>
</tr>
<tr>
<td>VARBIT</td>
</tr>
<tr>
<td>NUMERIC</td>
</tr>
<tr>
<td>INT</td>
</tr>
<tr>
<td>SHORT</td>
</tr>
<tr>
<td>MONETARY</td>
</tr>
<tr>
<td>FLOAT</td>
</tr>
<tr>
<td>DOUBLE</td>
</tr>
<tr>
<td>DATE</td>
</tr>
<tr>
<td>TIME</td>
</tr>
<tr>
<td>TIMESTAMP</td>
</tr>
<tr>
<td>SET</td>
</tr>
<tr>
<td>MULTISET</td>
</tr>
<tr>
<td>SEQUENCE</td>
</tr>
<tr>
<td>OBJECT</td>
</tr>
<tr>
<td>INCLUDE_OID</td>
</tr>
<tr>
<td>READ_LOCK</td>
</tr>
<tr>
<td>WRITE_LOCK</td>
</tr>
</tbody>
</table>
<p><a name="auto_commit.3D" id="auto_commit.3D"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">auto_commit=</span></h4>
<p>Description</p>
<p>This method is used to set the&nbsp;<b>auto_commit</b>&nbsp;mode of the current connection. If&nbsp;<b>auto_commit</b>&nbsp;is set to&nbsp;<i>true</i>, after every&nbsp;<i>Statement.execute</i>&nbsp;call the transaction will be immediately committed.</p>
<p>Syntax</p>
<pre class="ruby">auto_commit= <span style="color: #0000ff; font-weight: bold;">true</span> <span style="color: #9966cc; font-weight: bold;">or</span> <span style="color: #0000ff; font-weight: bold;">false</span> ? <span style="color: #0000ff; font-weight: bold;">nil</span></pre>
<p>Return value</p>
<ul>
<li><i>nil</i></li>
</ul>
<p><a name="auto_commit.3F" id="auto_commit.3F"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">auto_commit?</span></h4>
<p>Description</p>
<p>This method is used to determine whether&nbsp;<b>auto_commit</b>&nbsp;mode of the current connection is set to true or false.</p>
<p>Syntax</p>
<pre class="ruby">auto_commit? ? <span style="color: #0000ff; font-weight: bold;">true</span> <span style="color: #9966cc; font-weight: bold;">or</span> <span style="color: #0000ff; font-weight: bold;">false</span></pre>
<p>Return value</p>
<ul>
<li><i>true</i>: auto_commit is set to true</li>
<li><i>false</i>: auto_commit is set to false</li>
</ul>
<p><a name="connect" id="connect"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">connect</span></h4>
<p>Description</p>
<p>This method is used to establish the connection with the database server by using the given information such as the database name, server address, port number, username and password. If the username and password are not set,&nbsp;<b>public</b>&nbsp;is used as default the default username and "" (<i>empty password</i>) is used as a password.</p>
<p>Example</p>
<pre class="ruby"><span style="color: #0066ff; font-weight: bold;">@con</span> = Cubrid.<span style="color: #9900cc;">connect</span><span style="color: #006600; font-weight: bold;">(</span><span style="color: #996600;">'db_name'</span>, <span style="color: #996600;">'host'</span>, port, <span style="color: #996600;">'db_user'</span>, <span style="color: #996600;">'db_password'</span><span style="color: #006600; font-weight: bold;">)</span>
&nbsp;
<span style="color: #008000; font-style: italic;">#OR</span>
&nbsp;
<span style="color: #0066ff; font-weight: bold;">@con</span> = Cubrid.<span style="color: #9900cc;">connect</span><span style="color: #006600; font-weight: bold;">(</span><span style="color: #996600;">'db_name'</span><span style="color: #006600; font-weight: bold;">)</span></pre>
<ul>
<li><i>db_name</i>&nbsp;: a string representing the database name</li>
<li><i>host</i>&nbsp;: a string representing the host name of the server (by default it is&nbsp;<b>localhost</b>)</li>
<li><i>port</i>&nbsp;: an integer representing the server port (by default it is&nbsp;<b>30000</b>&nbsp;- thirty thousand)</li>
<li><i>db_user</i>&nbsp;: a string representing the database user name (by default it is&nbsp;<b>public</b>)</li>
<li><i>db_passwd</i>&nbsp;: a string representing the database user password (by default it is "" -&nbsp;<i>empty password</i>)</li>
</ul>
<p>Return Value</p>
<ul>
<li><i>@con</i>: The connection has successfully been established!</li>
</ul>
<ul>
<li><i>nil</i>: Filed to establish the connection.</li>
</ul>
<p><a name="close" id="close"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">close</span></h4>
<p>Description</p>
<p>This method is used to terminate the connection with the server. All pending Statements will also be closed.</p>
<p>Example</p>
<pre class="ruby"><span style="color: #0066ff; font-weight: bold;">@con</span>.<span style="color: #9900cc;">close</span><span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span></pre>
<p><a name="commit" id="commit"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">commit</span></h4>
<p>Description</p>
<p>This method is used to commit the transactions being performed currently in the connection.</p>
<p>Example</p>
<pre class="ruby"><span style="color: #0066ff; font-weight: bold;">@con</span>.<span style="color: #9900cc;">commit</span></pre>
<p>Return value</p>
<ul>
<li><i>nil</i></li>
</ul>
<p><a name="rollback" id="rollback"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">rollback</span></h4>
<p>Description</p>
<p>This method is used to rollback the last performed transactions. If the transaction is terminated, all Statement objects will also be closed.</p>
<p>Example</p>
<pre class="ruby"><span style="color: #0066ff; font-weight: bold;">@con</span>.<span style="color: #9900cc;">rollback</span></pre>
<p>Return value</p>
<ul>
<li><i>nil</i></li>
</ul>
<p><a name="glo_new" id="glo_new"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">glo_new</span></h4>
<p>Description</p>
<p>This method is used to create a new GLO object. The&nbsp;<i>glo_new</i>&nbsp;method will return the OID of the newly created object. When&nbsp;<i>glo_new</i>&nbsp;is called CUBRID provides GLO which will store the binary data. Later GLO object can be directly accessed by OID.</p>
<p>Syntax</p>
<pre class="ruby">glo_new<span style="color: #006600; font-weight: bold;">(</span>classname <span style="color: #006600; font-weight: bold;">&lt;</span>, filename<span style="color: #006600; font-weight: bold;">&gt;</span><span style="color: #006600; font-weight: bold;">)</span> ? OID </pre>
<p>Return value</p>
<ul>
<li><i>OID</i>:</li>
</ul>
<p>Example</p>
<p>The below example illustrates how to use&nbsp;<i>glo_new</i>&nbsp;method. When called, the data inside the file, whose filename has been passed as a parameter, will be stored in the database. If the filename is not indicated, the method will create an empty GLO object.</p>
<div editor_component="code_highlighter" code_type="Ruby" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">con&nbsp;=&nbsp;Cubrid.connect('subway')<br /> con.query('create&nbsp;table&nbsp;attachfile&nbsp;under&nbsp;glo&nbsp;(name&nbsp;string)')<br /> con.commit<br /> &nbsp;<br /> glo&nbsp;=&nbsp;con.glo_new('attachfile',&nbsp;'pic.jpg')<br /> glo.glo_size&nbsp;&nbsp;#=&gt;&nbsp;1234<br /> &nbsp;<br /> glo&nbsp;=&nbsp;con.glo_new('attachfile',&nbsp;'')<br /> glo.glo_size&nbsp;&nbsp;#=&gt;&nbsp;0<br /> glo.glo_save('pic.jpg')<br /> glo.glo_size&nbsp;&nbsp;#=&gt;&nbsp;1234</div>
<p><a name="query" id="query"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">query</span></h4>
<p>Description</p>
<p>This method directly executes the SQL statement, which has been passed as a parameter, without a need to perform the&nbsp;<i>execute</i>&nbsp;method.</p>
<p>Syntax</p>
<pre class="ruby">query<span style="color: #006600; font-weight: bold;">(</span>sql <span style="color: #006600; font-weight: bold;">[!</span>, option<span style="color: #006600; font-weight: bold;">]</span><span style="color: #006600; font-weight: bold;">)</span> ? Statement
&nbsp;
<span style="color: #9966cc; font-weight: bold;">OR</span>
&nbsp;
query<span style="color: #006600; font-weight: bold;">(</span>sql <span style="color: #006600; font-weight: bold;">[!</span>, option<span style="color: #006600; font-weight: bold;">]</span><span style="color: #006600; font-weight: bold;">)</span> <span style="color: #006600; font-weight: bold;">{</span> <span style="color: #006600; font-weight: bold;">|</span>row<span style="color: #006600; font-weight: bold;">|</span>
  ...
<span style="color: #006600; font-weight: bold;">}</span> ? <span style="color: #0000ff; font-weight: bold;">nil</span> </pre>
<p>Parameters</p>
<ul>
<li><i>sql</i>&nbsp;: a string representing the SQL statement</li>
<li><i>option</i>:&nbsp;<i>[!Optional]</i>&nbsp;If&nbsp;<b>Cubrid::INCLUDE_OID</b>&nbsp;is passed as an option, the&nbsp;<i>query</i>&nbsp;method will behave like the&nbsp;<i>prepare</i>&nbsp;method.</li>
</ul>
<p>Return value</p>
<ul>
<li><i>stmt</i>: The request handler</li>
<li><i>nil</i>: The query has not been executed</li>
</ul>
<p>Examples</p>
<p><b>A.</b></p>
<pre class="ruby"><div editor_component="code_highlighter" code_type="Ruby" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">sql&nbsp;=&nbsp;"INSERT&nbsp;INTO&nbsp;table1&nbsp;(id,&nbsp;name)&nbsp;VALUES&nbsp;(1,&nbsp;'Ruby')"<br />
stmt&nbsp;=&nbsp;@con.query(sql)<br />
@con.commit</div><br /></pre>
<p><b>B.</b></p>
<pre class="ruby"><div editor_component="code_highlighter" code_type="Ruby" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">con&nbsp;=&nbsp;Cubrid.connect('demodb')<br />stmt&nbsp;=&nbsp;con.query('SELECT&nbsp;*&nbsp;FROM&nbsp;db_user')<br />&nbsp;<br />while&nbsp;row&nbsp;=&nbsp;stmt.fetch<br />&nbsp;&nbsp;&nbsp;print&nbsp;row<br />end<br /><br />stmt.close<br />stmt&nbsp;=&nbsp;con.query('SELECT&nbsp;*&nbsp;FROM&nbsp;db_user')&nbsp;{&nbsp;|row|<br />&nbsp;&nbsp;&nbsp;print&nbsp;row<br />}<br /><br />con.close</div><br /></pre>
<p><a name="prepare" id="prepare"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">prepare</span></h4>
<p>Description</p>
<p>This method is used to&nbsp;<i>prepare</i>&nbsp;an SQL statement.</p>
<p>Syntax</p>
<pre class="ruby">prepare<span style="color: #006600; font-weight: bold;">(</span>sql <span style="color: #006600; font-weight: bold;">&lt;</span>, option<span style="color: #006600; font-weight: bold;">&gt;</span><span style="color: #006600; font-weight: bold;">)</span> ? Statement
&nbsp;
<span style="color: #008000; font-style: italic;">#OR</span>
&nbsp;
prepare<span style="color: #006600; font-weight: bold;">(</span>sql <span style="color: #006600; font-weight: bold;">&lt;</span>, option<span style="color: #006600; font-weight: bold;">&gt;</span><span style="color: #006600; font-weight: bold;">)</span> <span style="color: #006600; font-weight: bold;">{</span> <span style="color: #006600; font-weight: bold;">|</span>stmt<span style="color: #006600; font-weight: bold;">|</span>
  ...
<span style="color: #006600; font-weight: bold;">}</span> ? <span style="color: #0000ff; font-weight: bold;">nil</span> </pre>
<p>Parameters</p>
<ul>
<li><i>sql</i>&nbsp;: a string representing the SQL statement</li>
<li><i>option</i>&nbsp;:&nbsp;<i>[!Optional]</i>&nbsp;If&nbsp;<b>Cubrid::INCLUDE_OID</b>&nbsp;is passed as an option, the returned results will include OID, which can be later retrieved by calling&nbsp;<code style="background-color: #f9f9f9;">stmt.get_oid</code>&nbsp;method.</li>
</ul>
<p>Return Value</p>
<ul>
<li><i>stmt</i>: The request handle</li>
</ul>
<ul>
<li><i>nil</i>: Filed to prepare the SQL statement.</li>
</ul>
<p>Example</p>
<pre class="ruby"><div editor_component="code_highlighter" code_type="Ruby" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">sql&nbsp;=&nbsp;"INSERT&nbsp;INTO&nbsp;table1&nbsp;(id,&nbsp;name)&nbsp;VALUES&nbsp;(?,&nbsp;?)"<br />stmt&nbsp;=&nbsp;@con.prepare(sql)<br />con&nbsp;=&nbsp;Cubrid.connect('demodb')<br />stmt&nbsp;=&nbsp;con.prepare('SELECT&nbsp;*&nbsp;FROM&nbsp;db_user')<br />stmt.execute<br />
r&nbsp;=&nbsp;stmt.fetch<br /><br />stmt.close<br />con.close<br />con.prepare('SELECT&nbsp;*&nbsp;FROM&nbsp;db_user')&nbsp;{&nbsp;|stmt|<br />&nbsp;&nbsp;&nbsp;stmt.execute<br />&nbsp;&nbsp;&nbsp;r&nbsp;=&nbsp;stmt.fetch<br />}<br />
con.close</div><br /></pre>
<p><a name="to_s" id="to_s"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">to_s</span></h4>
<p>Description</p>
<p>This method is used to get the current connection information.</p>
<p>Example</p>
<pre class="ruby"><span style="color: #008000; font-style: italic;"># same as</span>
<span style="color: #008000; font-style: italic;"># puts @con</span>
connection_info = <span style="color: #0066ff; font-weight: bold;">@con</span>.<span style="color: #9900cc;">to_s</span></pre>
<p>Return values</p>
<ul>
<li><i>connection_info</i>&nbsp;: a string representing the connection information.</li>
</ul>
<p><a name="server_version" id="server_version"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">server_version</span></h4>
<p>Description</p>
<p>This method is used to get the version of the database server.</p>
<p>Example</p>
<pre class="ruby">version = <span style="color: #0066ff; font-weight: bold;">@con</span>.<span style="color: #9900cc;">server_version</span></pre>
<p>Return values</p>
<ul>
<li><i>version</i>&nbsp;: a string representing the version of the database server.</li>
</ul>
<p><a name="Statement_Class" id="Statement_Class"></a></p>
<h3 style="padding-left: 60px;"><span class="mw-headline">Statement Class</span></h3>
<p><a name="Data_Types" id="Data_Types"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">Data Types</span></h4>
<p>The table below shows the data type conversion between CUBRID native data types and Ruby representation.</p>
<table border="1" style="line-height: 19px; font-family: sans-serif; border-collapse: collapse; background-color: #ffffaa;">
<tbody>
<tr style="text-align: center; font-weight: bold;">
<td style="width: 200px;">CUBRID Data Types</td>
<td style="width: 300px;">Ruby Data Type Representation</td>
</tr>
<tr>
<td>int, short</td>
<td>fixnum, bignum</td>
</tr>
<tr>
<td>float, double, numeric, monetary</td>
<td>float</td>
</tr>
<tr>
<td>char, varchar, ncahr, varnchar</td>
<td>string</td>
</tr>
<tr>
<td>bit, varbit</td>
<td>string</td>
</tr>
<tr>
<td>date, time, timestamp</td>
<td>Time</td>
</tr>
<tr>
<td>object</td>
<td>OID</td>
</tr>
<tr>
<td>collection</td>
<td>array</td>
</tr>
</tbody>
</table>
<p><a name="affected_rows" id="affected_rows"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">affected_rows</span></h4>
<p>Description</p>
<p>This method is used to get the number of rows which have been affected by the SQL statements (INSERT, DELETE, UPDATE).</p>
<p>Example</p>
<pre class="ruby">stmt = <span style="color: #0066ff; font-weight: bold;">@con</span>.<span style="color: #9900cc;">query</span><span style="color: #006600; font-weight: bold;">(</span><span style="color: #996600;">"UPDATE cities SET name = 'Paris' WHERE id = 4"</span><span style="color: #006600; font-weight: bold;">)</span>
<span style="color: #0066ff; font-weight: bold;">@con</span>.<span style="color: #9900cc;">commit</span>
num = stmt.<span style="color: #9900cc;">affected_rows</span></pre>
<p>Return values</p>
<ul>
<li><i>num</i>&nbsp;: an integer representing the number of rows affected by the last SQL statement.</li>
</ul>
<p><a name="bind" id="bind"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">bind</span></h4>
<p>Description</p>
<p>This method is used to substitute the values instead of the variables indicated in the SQL queries as question marks&nbsp;<b>(?)</b>&nbsp;in the&nbsp;<b>prepare</b>&nbsp;method.</p>
<p>Syntax</p>
<pre class="ruby">bind<span style="color: #006600; font-weight: bold;">(</span>index, data <span style="color: #006600; font-weight: bold;">[!</span>, db_type, set_type<span style="color: #006600; font-weight: bold;">]</span><span style="color: #006600; font-weight: bold;">)</span> ? <span style="color: #0000ff; font-weight: bold;">nil</span> </pre>
<p>Parameters</p>
<ul>
<li><i>index</i>&nbsp;: an integer representing the order of the variable to be replaced - first, second, ...</li>
<li><i>data</i>&nbsp;: a value representing the data to be replaced for the variable at the order&nbsp;<i>index</i>.</li>
<li><i>db_type</i>&nbsp;:&nbsp;<i>[!Optional]</i>&nbsp;<i>db_type</i>&nbsp;is a type of the value to be bound. It can be omitted by default. If it is omitted, the type is automatically cast to an appropriate one.</li>
<li><i>set_type</i>&nbsp;:&nbsp;<i>[!Optional]</i></li>
</ul>
<p>Return value</p>
<ul>
<li><b>nil</b></li>
</ul>
<p>Example</p>
<pre class="ruby"><div editor_component="code_highlighter" code_type="Ruby" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">index&nbsp;=&nbsp;1<br />value&nbsp;=&nbsp;"Ruby"<br /><br />stmt.bind(index,&nbsp;value)<br />con&nbsp;=&nbsp;Cubrid.connect('demodb')<br />con.auto_commit&nbsp;=&nbsp;true<br />con.query('create&nbsp;table&nbsp;a&nbsp;(a&nbsp;int,&nbsp;b&nbsp;double,&nbsp;c&nbsp;string,&nbsp;d&nbsp;date)')<br />&nbsp;<br />con.prepare('insert&nbsp;into&nbsp;a&nbsp;values&nbsp;(?,&nbsp;?,&nbsp;?,&nbsp;?)')&nbsp;{&nbsp;|stmt|<br />&nbsp;&nbsp;&nbsp;stmt.bind(1,&nbsp;10)<br />&nbsp;&nbsp;&nbsp;stmt.bind(2,&nbsp;3.141592)<br />&nbsp;&nbsp;&nbsp;stmt.bind(3,&nbsp;'hello')<br />&nbsp;&nbsp;&nbsp;stmt.bind(4,&nbsp;Time.local(2007,&nbsp;12,&nbsp;25,&nbsp;10,&nbsp;10,&nbsp;10),&nbsp;Cubrid::DATE)<br />&nbsp;&nbsp;&nbsp;stmt.execute<br />}<br />
con.close</div><br /></pre>
<p><a name="close" id="close"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">close</span></h4>
<p>Description</p>
<p>This method is used to close the Statement.</p>
<p>Syntax</p>
<pre class="ruby">close<span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span> ? <span style="color: #0000ff; font-weight: bold;">nil</span> </pre>
<p>Return value</p>
<ul>
<li><b>nil</b></li>
</ul>
<p>Example</p>
<pre class="ruby">stmt.<span style="color: #9900cc;">close</span></pre>
<p><a name="column_info" id="column_info"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">column_info</span></h4>
<p>Description</p>
<p>Returns the&nbsp;<i>column information</i>&nbsp;of the&nbsp;<i>fetched rows</i>. Because of the&nbsp;<i>column information</i>&nbsp;is represented as a hash, it is returned in the form of&nbsp;<i>array</i>.</p>
<p>Syntax</p>
<pre class="ruby">column_info<span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span> ? <span style="color: #cc0066; font-weight: bold;">array</span> </pre>
<p>Return value</p>
<ul>
<li><b>array</b>: an array representing the hash of the key name, type_name, precision, scale, nullable, which refer to the column's name, the column's data type, precision, scale, null-ability, respectively.</li>
</ul>
<p>Example</p>
<pre class="ruby"><div editor_component="code_highlighter" code_type="Ruby" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">con&nbsp;=&nbsp;Cubrid.connect('demodb')<br />con.prepare('SELECT&nbsp;*&nbsp;FROM&nbsp;db_user')&nbsp;{&nbsp;|stmt|<br />&nbsp;&nbsp;&nbsp;stmt.execute<br />&nbsp;&nbsp;&nbsp;stmt.column_info.each&nbsp;{&nbsp;|col|<br />&nbsp;&nbsp;&nbsp;print&nbsp;col[!'name']<br />&nbsp;&nbsp;&nbsp;print&nbsp;col[!'type_name']<br />&nbsp;&nbsp;&nbsp;print&nbsp;col[!'precision']<br />&nbsp;&nbsp;&nbsp;print&nbsp;col[!'scale']<br /> &nbsp;&nbsp;print&nbsp;col[!'nullable']<br />&nbsp;&nbsp;&nbsp;}<br />}<br />
con.close</div><br /></pre>
<p><a name="each" id="each"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">each</span></h4>
<p>Description</p>
<p>Returns the&nbsp;<i>fetched rows</i>&nbsp;one by one in a cycle to the inside block. The row is represented as an array.</p>
<p>Syntax</p>
<pre class="ruby">each<span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span> <span style="color: #006600; font-weight: bold;">{</span> <span style="color: #006600; font-weight: bold;">|</span>row<span style="color: #006600; font-weight: bold;">|</span> block <span style="color: #006600; font-weight: bold;">}</span> ? <span style="color: #0000ff; font-weight: bold;">nil</span> </pre>
<p>Return value</p>
<ul>
<li><b>nil</b></li>
</ul>
<p>Example</p>
<pre class="ruby"><div editor_component="code_highlighter" code_type="Ruby" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">con&nbsp;=&nbsp;Cubrid.connect('demodb')<br />con.prepare('SELECT&nbsp;*&nbsp;FROM&nbsp;db_user')&nbsp;{&nbsp;|stmt|<br />&nbsp;&nbsp;&nbsp;stmt.execute<br />&nbsp;&nbsp;&nbsp;stmt.each&nbsp;{&nbsp;|r|<br />&nbsp;&nbsp;&nbsp;print&nbsp;r[!0]<br />&nbsp;&nbsp;&nbsp;}<br />}<br />con.close</div><br /></pre>
<p><a name="each_hash" id="each_hash"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">each_hash</span></h4>
<p>Description</p>
<p>Returns the&nbsp;<i>fetched rows</i>&nbsp;one by one in a cycle to the inside block similar to the&nbsp;<i>each()</i>&nbsp;method. The difference is that&nbsp;<i>each_hash</i>&nbsp;returns a row which is represented as a hash.</p>
<p>Syntax</p>
<pre class="ruby">each_hash<span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span> <span style="color: #006600; font-weight: bold;">{</span> <span style="color: #006600; font-weight: bold;">|</span>hash<span style="color: #006600; font-weight: bold;">|</span> block <span style="color: #006600; font-weight: bold;">}</span> ? <span style="color: #0000ff; font-weight: bold;">nil</span></pre>
<p>Return value</p>
<ul>
<li><b>nil</b></li>
</ul>
<p>Example</p>
<pre class="ruby"><div editor_component="code_highlighter" code_type="Ruby" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">con&nbsp;=&nbsp;Cubrid.connect('demodb')<br />con.prepare('SELECT&nbsp;*&nbsp;FROM&nbsp;db_user')&nbsp;{&nbsp;|stmt|<br />&nbsp;&nbsp;&nbsp;stmt.execute<br />&nbsp;&nbsp;&nbsp;stmt.each_hash&nbsp;{&nbsp;|r|<br />&nbsp;&nbsp;&nbsp;print&nbsp;r[!'name']<br />&nbsp;&nbsp;&nbsp;}<br />}<br />con.close</div><br /></pre>
<p><a name="execute" id="execute"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">execute</span></h4>
<p>Description</p>
<p>This method is used to execute a given SQL statement. It can receive zero or more parameters depending on whether the&nbsp;<i>bind</i>&nbsp;method has been used before or not. If the statement&nbsp;<i>stmt</i>&nbsp;has been already&nbsp;<i>binded' to the values, the&nbsp;</i>execute<i>&nbsp;method does not need any parameter. If the statement</i>stmt<i>&nbsp;has not been&nbsp;</i>binded' to any values yet, the&nbsp;<i>execute</i>&nbsp;method will instantly bind the receive parameters and execute the SQL statement. If&nbsp;<b>auto_commit</b>&nbsp;is set to&nbsp;<i>true</i>, the&nbsp;<i>execute</i>&nbsp;method will automatically commit the transaction.</p>
<p>Syntax</p>
<pre class="ruby">execute<span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span> ? int
execute<span style="color: #006600; font-weight: bold;">(</span>...<span style="color: #006600; font-weight: bold;">)</span> ? int</pre>
<p>Parameters</p>
<ul>
<li><i>values</i>&nbsp;:&nbsp;<i>[!Optional]</i>&nbsp;a value representing the data to be binded to each variable in the SQL statement.</li>
</ul>
<p>Return value</p>
<ul>
<li><i>int</i>: Returns 1, if successful; 0 in case of failure.</li>
</ul>
<p>Example</p>
<pre class="ruby"><div editor_component="code_highlighter" code_type="Ruby" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">con&nbsp;=&nbsp;Cubrid.connect('demodb')<br />con.prepare('insert&nbsp;into&nbsp;a&nbsp;values&nbsp;(?,&nbsp;?,&nbsp;?,&nbsp;?)')&nbsp;{&nbsp;|stmt|<br />&nbsp;&nbsp;&nbsp;stmt.execute&nbsp;(10,&nbsp;3.141592,&nbsp;'hello',&nbsp;Time.local(2007,&nbsp;12,&nbsp;25))<br />}<br />con.close<br />sql&nbsp;=&nbsp;"INSERT&nbsp;INTO&nbsp;table1&nbsp;(id,&nbsp;name)&nbsp;VALUES&nbsp;(?,&nbsp;?)"<br />stmt&nbsp;=&nbsp;@con.prepare(sql)<br />value1&nbsp;=&nbsp;1<br />value2&nbsp;=&nbsp;"Ruby"<br />stmt.bind(1,&nbsp;value1)<br />stmt.bind(2,&nbsp;value2)<br />stmt.execute</div></pre>
<p>OR</p>
<pre class="ruby"><div editor_component="code_highlighter" code_type="Ruby" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">sql&nbsp;=&nbsp;"INSERT&nbsp;INTO&nbsp;table1&nbsp;(id,&nbsp;name)&nbsp;VALUES&nbsp;(?,&nbsp;?)"<br />stmt&nbsp;=&nbsp;@con.prepare(sql)<br />stmt.execute(value1,&nbsp;value2)</div><br /></pre>
<p><a name="fetch" id="fetch"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">fetch</span></h4>
<p>Description</p>
<p>Returns the&nbsp;<i>row</i>&nbsp;under the cursor as an array of column data. Once fetched the cursor is incremented by one, that is pointed to the next&nbsp;<i>row</i>. The&nbsp;<i>row</i>&nbsp;is represented as an array.</p>
<p>Syntax</p>
<pre class="ruby">fetch<span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span> ? <span style="color: #cc0066; font-weight: bold;">array</span> <span style="color: #9966cc; font-weight: bold;">or</span> <span style="color: #0000ff; font-weight: bold;">nil</span> </pre>
<p>Return value</p>
<ul>
<li><i>array&nbsp;</i>: an array representing the&nbsp;<i>row</i>&nbsp;with columns.</li>
<li><i>nil</i>: if there is no&nbsp;<i>row</i>&nbsp;to be fetched, the method returns&nbsp;<i>nil</i>.</li>
</ul>
<p>Below is a table which illustrates how</p>
<p>Example</p>
<pre class="ruby"><div editor_component="code_highlighter" code_type="Ruby" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">con&nbsp;=&nbsp;Cubrid.connect('demodb')<br />con.prepare('SELECT&nbsp;*&nbsp;FROM&nbsp;db_user')&nbsp;{&nbsp;|stmt|<br />&nbsp;&nbsp;&nbsp;stmt.execute<br />&nbsp;&nbsp;&nbsp;r&nbsp;=&nbsp;stmt.fetch<br />&nbsp;&nbsp;&nbsp;print&nbsp;r[!0]<br />}<br />con.close</div><br /></pre>
<p><a name="fetch_hash" id="fetch_hash"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">fetch_hash</span></h4>
<p>Description</p>
<p>Returns the&nbsp;<i>row</i>&nbsp;under the cursor as a hash of column data. Once fetched the cursor is incremented by one, that is pointed to the next&nbsp;<i>row</i>. The&nbsp;<i>row</i>&nbsp;is represented as an array.</p>
<p>Syntax</p>
<pre class="ruby">fetch_hash<span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span> ? hash <span style="color: #9966cc; font-weight: bold;">or</span> <span style="color: #0000ff; font-weight: bold;">nil</span> </pre>
<p>Return value</p>
<ul>
<li><i>hash&nbsp;</i>: a hash representing the&nbsp;<i>row</i>&nbsp;with columns.</li>
<li><i>nil</i>: if there is no&nbsp;<i>row</i>&nbsp;to be fetched, the method returns&nbsp;<i>nil</i>.</li>
</ul>
<p>Example</p>
<pre class="ruby"><div editor_component="code_highlighter" code_type="Ruby" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">con&nbsp;=&nbsp;Cubrid.connect('demodb')<br />con.prepare('SELECT&nbsp;*&nbsp;FROM&nbsp;db_user')&nbsp;{&nbsp;|stmt|<br />&nbsp;&nbsp;&nbsp;stmt.execute<br />&nbsp;&nbsp;&nbsp;r&nbsp;=&nbsp;stmt.fetch_hash<br />&nbsp;&nbsp;&nbsp;print&nbsp;r[!'name']<br />}<br />con.close</div><br /></pre>
<p><a name="get_oid" id="get_oid"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">get_oid</span></h4>
<p>Description</p>
<p>In case a&nbsp;<i>statement</i>&nbsp;has been&nbsp;<i>prepared</i>&nbsp;with&nbsp;<b>Cubrid::INCLUDE_OID</b>&nbsp;option, the&nbsp;<i>get_oid</i>&nbsp;method will return the Oid of the created GLO object.</p>
<p>Syntax</p>
<pre class="ruby">get_oid<span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span> ? Oid </pre>
<p>Return value</p>
<ul>
<li><i>Oid</i>: the OID of the newly created GLO object.</li>
</ul>
<p>Example</p>
<pre class="ruby"><div editor_component="code_highlighter" code_type="Ruby" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">con&nbsp;=&nbsp;Cubrid.connect('demodb')<br />con.prepare('SELECT&nbsp;*&nbsp;FROM&nbsp;db_user',&nbsp;Cubrid::INCLUDE_OID)&nbsp;{&nbsp;|stmt|<br />&nbsp;&nbsp;&nbsp;stmt.execute<br />&nbsp;&nbsp;&nbsp;stmt.fetch<br />&nbsp;&nbsp;&nbsp;oid&nbsp;=&nbsp;stmt.get_oid<br />&nbsp;&nbsp;&nbsp;print&nbsp;oid.table<br />}<br />con.close</div><br /></pre>
<p><a name="Oid_Class" id="Oid_Class"></a></p>
<h3 style="padding-left: 60px;"><span class="mw-headline">Oid Class</span></h3>
<p><a name=".5B.5D.28col_name.29" id=".5B.5D.28col_name.29"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">[!](col_name)</span></h4>
<p>Description</p>
<p>Returns the column data of the OID.</p>
<p>Syntax</p>
<pre class="ruby"><span style="color: #006600; font-weight: bold;">[!</span><span style="color: #006600; font-weight: bold;">]</span><span style="color: #006600; font-weight: bold;">(</span>col_name<span style="color: #006600; font-weight: bold;">)</span> ? obj </pre>
<p>Return value</p>
<ul>
<li><i>obj</i>: the column data of the OID.</li>
</ul>
<p>Example</p>
<pre class="ruby"><div editor_component="code_highlighter" code_type="Ruby" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">con&nbsp;=&nbsp;Cubrid.connect('demodb')<br />stmt&nbsp;=&nbsp;con.prepare('SELECT&nbsp;*&nbsp;FROM&nbsp;db_user',&nbsp;Cubrid::INCLUDE_OID)<br />stmt.execute<br />stmt.fetch<br />oid&nbsp;=&nbsp;stmt.get_oid<br />print&nbsp;oid[!'name']<br />print&nbsp;oid.name<br />stmt.close<br />con.close</div></pre>
<p>Another way to access the data in the column is to call the&nbsp;<i>name</i>&nbsp;as a method.</p>
<pre class="ruby"><div editor_component="code_highlighter" code_type="Ruby" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">oid&nbsp;=&nbsp;stmt.get_oid<br />print&nbsp;oid.name</div><br /></pre>
<p><a name=".5B.5D.3D.28col_name.2C_obj.29" id=".5B.5D.3D.28col_name.2C_obj.29"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">[!]=(col_name, obj)</span></h4>
<p>Description</p>
<p>Stores the data to the OID column. In order to reflect the saved data in the database server&nbsp;<b>save</b>&nbsp;method should be called afterwards.</p>
<p>Syntax</p>
<pre class="ruby"><span style="color: #006600; font-weight: bold;">[!</span><span style="color: #006600; font-weight: bold;">]</span>=<span style="color: #006600; font-weight: bold;">(</span>col_name, obj<span style="color: #006600; font-weight: bold;">)</span> ? <span style="color: #0000ff; font-weight: bold;">nil</span> </pre>
<p>Return value</p>
<ul>
<li><i>obj</i>: the column data of the OID.</li>
</ul>
<p>Example</p>
<pre class="ruby"><div editor_component="code_highlighter" code_type="Ruby" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">con&nbsp;=&nbsp;Cubrid.connect('demodb')<br />stmt&nbsp;=&nbsp;con.prepare('SELECT&nbsp;*&nbsp;FROM&nbsp;db_user',&nbsp;Cubrid::INCLUDE_OID)<br />stmt.execute<br />stmt.fetch<br />oid&nbsp;=&nbsp;stmt.get_oid<br />oid[!'name']&nbsp;=&nbsp;'foo'<br />oid.save<br />stmt.close<br />con.close</div></pre>
<p>It is also possible to store and save the data using the corresponding&nbsp;<i>name</i>&nbsp;and&nbsp;<i>save</i>&nbsp;methods for the column.</p>
<pre class="ruby"><div editor_component="code_highlighter" code_type="Ruby" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">oid&nbsp;=&nbsp;stmt.get_oid<br />oid.name&nbsp;=&nbsp;'foo'<br />oid.save</div><br /></pre>
<p><a name="drop" id="drop"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">drop</span></h4>
<p>Description</p>
<p>Removes the OID from the database server.</p>
<p>Syntax</p>
<pre class="ruby">drop<span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span> ? <span style="color: #0000ff; font-weight: bold;">self</span></pre>
<p>Return value</p>
<ul>
<li><i>self</i></li>
</ul>
<p><a name="each" id="each"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">each</span></h4>
<p>Description</p>
<p>Passes the column name and its data to the following block.</p>
<p>Syntax</p>
<pre class="ruby">each<span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span> <span style="color: #006600; font-weight: bold;">{</span> <span style="color: #006600; font-weight: bold;">|</span>name, val<span style="color: #006600; font-weight: bold;">|</span>
  ...
<span style="color: #006600; font-weight: bold;">}</span> ? <span style="color: #0000ff; font-weight: bold;">nil</span></pre>
<p>Return value</p>
<ul>
<li><i>nil</i></li>
</ul>
<p>Example</p>
<pre class="ruby"><div editor_component="code_highlighter" code_type="Ruby" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">con&nbsp;=&nbsp;Cubrid.connect('demodb')<br />stmt&nbsp;=&nbsp;con.prepare('SELECT&nbsp;*&nbsp;FROM&nbsp;db_user',&nbsp;Cubrid::INCLUDE_OID)<br />stmt.execute<br />stmt.fetch<br />oid&nbsp;=&nbsp;stmt.get_oid<br />oid.each&nbsp;{&nbsp;|name,&nbsp;val|<br />&nbsp;&nbsp;&nbsp;print&nbsp;name<br />&nbsp;&nbsp;&nbsp;print&nbsp;val<br />}</div><br /></pre>
<p><a name="lock" id="lock"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">lock</span></h4>
<p>Description</p>
<p>Sets the Cubrid::READ_LOCK or Cubrid::WRITE_LOCK to the OID.</p>
<p>Syntax</p>
<pre class="ruby">lock<span style="color: #006600; font-weight: bold;">(</span>lockmode<span style="color: #006600; font-weight: bold;">)</span> ? <span style="color: #0000ff; font-weight: bold;">self</span></pre>
<p>Parameter</p>
<ul>
<li><i>lockmode</i>&nbsp;: the mode of the lock. Can be either&nbsp;<b>Cubrid::READ_LOCK</b>&nbsp;or&nbsp;<b>Cubrid::WRITE_LOCK</b>.</li>
</ul>
<p>Return value</p>
<ul>
<li><i>self</i></li>
</ul>
<p><a name="refresh" id="refresh"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">refresh</span></h4>
<p>Description</p>
<p>Reads the OID data from the database server. The column data of the OID is not automatically synchronized with the database server. In case much time has been elapsed since the Oid object has been created, the&nbsp;<i>refresh</i>&nbsp;method has to be called to read the data from the database server.</p>
<p>Syntax</p>
<pre class="ruby">refresh<span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span> ? <span style="color: #0000ff; font-weight: bold;">self</span></pre>
<p>Return value</p>
<ul>
<li><i>self</i></li>
</ul>
<p>Example</p>
<pre class="ruby"><div editor_component="code_highlighter" code_type="Ruby" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">con&nbsp;=&nbsp;Cubrid.connect('demodb')<br />stmt&nbsp;=&nbsp;con.prepare('SELECT&nbsp;*&nbsp;FROM&nbsp;db_user',&nbsp;Cubrid::INCLUDE_OID)<br />stmt.execute<br />stmt.fetch<br />oid&nbsp;=&nbsp;stmt.get_oid<br />print&nbsp;oid[!'name']<br /><br />#after&nbsp;some&nbsp;time<br />oid.refresh<br />print&nbsp;oid[!'name']<br />stmt.close<br />con.close</div><br /></pre>
<p><a name="save" id="save"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">save</span></h4>
<p>Description</p>
<p>Saves the data of OID to the database server.</p>
<p>Syntax</p>
<pre class="ruby">save<span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span> ? <span style="color: #0000ff; font-weight: bold;">self</span></pre>
<p>Return value</p>
<ul>
<li><i>self</i></li>
</ul>
<p><a name="table" id="table"></a></p>
<h4 style="padding-left: 30px;"><span class="mw-headline">table</span></h4>
<p>Description</p>
<p>Returns the&nbsp;<i>table</i>&nbsp;name of the OID.</p>
<p>Syntax</p>
<pre class="ruby">table<span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span> ? <span style="color: #cc0066; font-weight: bold;">string</span></pre>
<p>Return value</p>
<ul>
<li><i>string</i>&nbsp;: the&nbsp;<i>table</i>&nbsp;name of the OID</li>
</ul>
<p><a name="to_hash" id="to_hash"></a></p>
<h4><span class="mw-headline">to_hash</span></h4>
<p>Description</p>
<p>Returns the OID data in a hash.</p>
<p>Syntax</p>
<pre class="ruby">to_hash<span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span> ? <span style="color: #cc00ff; font-weight: bold;">Hash</span></pre>
<p>Return value</p>
<ul>
<li><i>Hash</i>&nbsp;: The OID data. The key will indicate on its name, and the value - its data.</li>
</ul>
<p><a name="to_s" id="to_s"></a></p>
<h4><span class="mw-headline">to_s</span></h4>
<p>Description</p>
<p>Returns the OID string.</p>
<p>Syntax</p>
<pre class="ruby">to_s<span style="color: #006600; font-weight: bold;">(</span><span style="color: #006600; font-weight: bold;">)</span> ? <span style="color: #cc0066; font-weight: bold;">string</span></pre>
<p>Return value</p>
<ul>
<li><i>string</i>&nbsp;: the OID string.</li>
</ul>
<p><a name="See_also" id="See_also"></a></p>
<h2><span class="mw-headline">See also</span></h2>
<ul>
<li><a rel="nofollow" href="/cubrid_ruby_programming" title="cubrid_ruby_programming" class="external text">Ruby Programming with CUBRID</a></li>
<li><a href="/manual/840" title="cubrid 2008 R4.0 manual">CUBRID API References</a></li>
</ul>]]></description>
                        <pubDate>Fri, 06 Jan 2012 03:13:47 -0800</pubDate>
                        <category>ruby</category>
                        <category>documentation</category>
                        <category>api</category>
                                </item>
        										        <item>
            <title>CUBRID Ruby Driver Installation Instructions</title>
            <dc:creator>CUBRID</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-ruby-driver-installation-instructions</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-ruby-driver-installation-instructions</guid>
                                    <description><![CDATA[<p style="text-align: center;"><img style="border: 0px; background-color: #ffffff; margin: 0px; padding: 0px;" src="/files/attach/images/49/454/001/gem_install_cubrid_web.png" alt="Install CUBRID gem" width="699" height="123" editor_component="image_link" /></p>
<h3>On Windows</h3>
<p>We have pushed the CUBRID Connector to&nbsp;Gemcutter. Use the above command (<i>gem install cubrid</i>) in the command line to install the latest version of Ruby Driver for CUBRID on Windows.</p>
<h3>On Linux</h3>
<p>Linux users can also install the CUBRID Connector through <b>gem</b>. Remember to add <b><i>-E</i></b>&nbsp;flag when installing the gem with <b>sudo</b>&nbsp;like "<b><i>sudo -E gem install cubrid</i></b>". The <b><i>-E</i></b> flag is necessary to make sure sudo does not reset the user path where CUBRID Database has been installed.</p>
<h2>What if I don't have Gem Installer?</h2>
<h3>On Windows</h3>
<ul>
<li><b>Install Ruby 1.8.7</b>. You can download it from RubyInstaller site at <a href="http://rubyinstaller.org/downloads/" target="_blank">http://rubyinstaller.org/downloads/</a>.</li>
<li><b>Install DevKit</b>. Most Ruby gems out there require the <b>mingw</b> compiler to build gems written in C. CUBRID gem has C codes as well, so DevKit is required to install the latest CUBRID gem. You can download the DevKit from the same RubyInstaller site at <a href="http://rubyinstaller.org/downloads/" target="_blank">http://rubyinstaller.org/downloads/</a>.    
<ul>
<li>In the command line navigate to the location where you installed the DevKit and <b>initialize DevKit</b> by typing the following command. This will generate the <i>config.yml</i> file to be used later in this Step. Your installed Rubies will be listed there (only those installed by a RubyInstaller package are detected at present).</li>
<div editor_component="code_highlighter" code_type="Bash" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">ruby dk.rb init</div>
<li>If necessary, <b>edit <i>config.yml</i></b> file to include installed Rubies not automagically discovered or remove Rubies you do not want to use the DevKit with. This step is not required if you have installed Ruby from <a href="http://rubyinstaller.org/downloads/" target="_blank">http://rubyinstaller.org/downloads/</a>.</li>
<li><b>Install DevKit</b> by typing the following command in the command line. This step installs (or updates) an operating_system.rb file into the relevant directory needed to implement a RubyGems pre_install hook and a devkit.rb helper library file into <i>&lt;RUBY_INSTALL_DIR&gt;lib ubysite_ruby</i>.</li>
<div editor_component="code_highlighter" code_type="Bash" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">ruby dk.rb install</div>
<li>For more information on DevKit, refer to <a href="https://github.com/oneclick/rubyinstaller/wiki/Development-Kit" target="_blank">http://github.com/oneclick/rubyinstaller/wiki/Development-Kit</a>.</li>
<li>Before trying to install cubrid, make sure that the "<b>make</b>" and "<b>gcc</b>" commands are available in your command line. If not, add&nbsp;<b>C:&#92;DevKit&#92;bin&#92;</b> and&nbsp;<b>C:&#92;DevKit&#92;mingw&#92;bin&#92;</b> to your PATH environment variable (we assumed DevKit is in C:&#92;DevKit).</li>
</ul>
<ul>
</ul>
</li>
<li><b>Install CUBRID gem</b> by typing the following command.</li>
<div editor_component="code_highlighter" code_type="Bash" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">gem install cubrid</div>
</ul>
<h3>On Linux</h3>
<ul>
<li><b>Install Ruby 1.8.7</b> by typing the following command.</li>
<div editor_component="code_highlighter" code_type="Bash" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">sudo apt-get -y install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 libopenssl-ruby rubygems1.8</div>
<li>You can see that <b>ruby1.8-dev</b> package has also been installed. It is necessary to compile the C code of the gem. If you do not have ruby1.8-dev package already in your system, install it by typing the following command.</li>
<div editor_component="code_highlighter" code_type="Bash" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">sudo apt-get install ruby1.8-dev</div>
<li><b>Create a symbolic link</b> for ruby to be able to run ruby command from the terminal.</li>
<div editor_component="code_highlighter" code_type="Bash" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby</div>
<li><b>Install CUBRID gem</b> by typing the following command. Do not forget to add <b><i>-E</i><span style="font-weight: normal;">&nbsp;flag after <i>sudo</i>&nbsp;to include the path to CUBRID.</span></b></li>
<div editor_component="code_highlighter" code_type="Bash" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">sudo -E gem install cubrid</div>
</ul>
<p>Here is a <a href="/?module=file&amp;act=procFileDownload&amp;file_srl=628538&amp;sid=06ad37c3e61b048934485ed551915073">test_cubrid.rb</a>&nbsp;file&nbsp;to see if CUBRID driver is correctly installed. Run the following command to execute the code:</p>
<p>
<div style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;" nogutter="false" collapse="false" first_line="1" code_type="Bash" editor_component="code_highlighter">ruby&nbsp;-rubygems&nbsp;test_cubrid.rb</div>
</p>
<p>Note: If you don't want to use "-rubygems" attribute, then you must copy the cubrid.so file from C:&#92;Ruby187&#92;lib&#92;ruby&#92;gems&#92;1.8&#92;gems&#92;cubrid-0.65&#92;ext to&nbsp;C:&#92;Ruby187&#92;lib&#92;ruby&#92;site_ruby&#92;1.8&#92;i386-msvcrt (the paths may vary according to your ruby installation).</p>]]></description>
                        <pubDate>Tue, 03 Jan 2012 17:58:59 -0800</pubDate>
                        <category>ruby</category>
                        <category>installation instructions</category>
                                </item>
        										        <item>
            <title>CUBRID Node.js 2.0 Tutorial – What’s new? (Part II)</title>
            <dc:creator>Esen Sagynov</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-node-js-2-0-tutorial-%e2%80%93-what%e2%80%99s-new-part-ii</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-node-js-2-0-tutorial-%e2%80%93-what%e2%80%99s-new-part-ii</guid>
                                    <description><![CDATA[<p>The <a href="/wiki_apis/entry/cubrid-node-js-2-0-tutorial-what&amp;rsquo;s-new-part-1">1st part</a> of this tutorial was focused on the new queries queuing feature. In this 2nd part of the tutorial we will show you some other new features implemented in the 2.0 release:</p>
<ul>
<li>Support for database parameters</li>
<li><a href="http://en.wikipedia.org/wiki/Binary_large_object">LOB</a> objects handling support</li>
<li>Extended database schema support</li>
</ul>
<p>And others&hellip;</p>
<h2>Database parameters</h2>
<p>After connecting to a database, a user can specify some &ldquo;global&rdquo; session parameters that will control the behavior of SQL statements transactions&rsquo; isolation level execution, the auto-commit behavior and others.</p>
<p>The complete list of these CUBRID database parameters is defined in the Constants.js file:</p>
<div editor_component="code_highlighter" code_type="JScript" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">exports.CCIDbParam&nbsp;=&nbsp;{<br /> &nbsp;&nbsp;CCI_PARAM_ISOLATION_LEVEL&nbsp;&nbsp;&nbsp;:&nbsp;1,<br /> &nbsp;&nbsp;CCI_PARAM_LOCK_TIMEOUT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;2,<br /> &nbsp;&nbsp;CCI_PARAM_MAX_STRING_LENGTH&nbsp;:&nbsp;3,<br /> &nbsp;&nbsp;CCI_PARAM_AUTO_COMMIT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;4<br /> };</div>
<p>For each parameter, the CUBRID communication protocol implements a dedicated support for GET and SET operations. Therefore, in order to manipulate them, also a dedicate functionality was needed in the Node.js driver and this is what we did in the 2.0 release.</p>
<p>Please note one exception - the <span style="color: #008080;"><em>MAX_STRING_LENGTH</em></span> parameter cannot be set programmatically from code; it&rsquo;s a broker parameter and the client can only query its current value.</p>
<p>We have provided support for:</p>
<ul>
<li>Getting a parameter value, using the <em><span style="color: #008080;">getDatabaseParameter (&hellip;)</span></em> method</li>
<li>Setting a parameter value, using the <span style="color: #008080;"><em>setDatabaseParameter (&hellip;)</em></span> method</li>
</ul>
<p>Let&rsquo;s see some examples. First, let set the value of the <a href="/manual/90/en/cci_set_isolation_level">ISOLATION_LEVEL</a> parameter:</p>
<div editor_component="code_highlighter" code_type="JScript" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">CUBRIDClient.connect(function&nbsp;(err)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;CUBRIDClient.setDatabaseParameter(CAS.CCIDbParam.CCI_PARAM_ISOLATION_LEVEL,<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CAS.CUBRIDIsolationLevel.TRAN_REP_CLASS_COMMIT_INSTANCE,&nbsp;function&nbsp;(err)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CUBRIDClient.close(function&nbsp;(err)&nbsp;{<br /> &hellip;</div>
<p>And let&rsquo;s see how we can retrieve the value of the <a href="/manual/831/en/Transaction Timeout">LOCK_TIMEOUT</a> parameter for the current session:</p>
<div editor_component="code_highlighter" code_type="JScript" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">CUBRIDClient.connect(function&nbsp;(err)&nbsp;{<br /> &nbsp;&nbsp;CUBRIDClient.getDatabaseParameter(CAS.CCIDbParam.CCI_PARAM_LOCK_TIMEOUT,&nbsp;function&nbsp;(err,&nbsp;value)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;Helpers.logInfo('LOCK_TIMEOUT&nbsp;is:&nbsp;'&nbsp;+&nbsp;value);<br /> &nbsp;&nbsp;&nbsp;&nbsp;CUBRIDClient.close(function&nbsp;(err)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;});<br /> &nbsp;&nbsp;});<br /> });</div>
<p>The output result is:</p>
<div editor_component="code_highlighter" code_type="Plain" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">LOCK_TIMEOUT&nbsp;is:&nbsp;-1</div>
<p><b>Note</b>: The same value can be obtained also from CUBRID Manager Client:</p>
<p><img src="/files/attach/images/194379/729/617/manager.png" alt="manager.png" width="590" height="340" /></p>
<p>If you need to change the default values for these parameters, it is highly recommended to do it immediately after connect (). One consequence is that you must use an explicit connect () statement in your application, and not the &ldquo;implicit connect&rdquo; driver feature (the &ldquo;implicit connect&rdquo; feature means that the driver can auto-connect when a query is first executed, without the need to issues an explicit connect() command).</p>
<h2>LOB objects handling</h2>
<p>In the previous driver version, the support for <a href="/wiki_tutorials/entry/working-with-cubrid-blob-clob-data-types">LOB</a> (CLOB/BLOB) objects was limited to query only. Now, we have implemented the completed protocol required to update such data type columns. Please note that, as in the other CUBRID drivers, we have implemented dedicated driver query functions for handling LOB objects, as follows:</p>
<ul>
<li>lobNew(&hellip;)</li>
<li>lobRead(&hellip;)</li>
<li>lobWrite(&hellip;)</li>
</ul>
<p>Let&rsquo;s see a simple example of inserting a LOB value (the code below is an &ldquo;extract&rdquo; from an ActionQueue series of method calls):</p>
<div editor_component="code_highlighter" code_type="JScript" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">&hellip;<br /> &nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(cb)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CUBRIDClient.lobNew(CUBRIDClient.LOB_TYPE_BLOB,&nbsp;cb);<br /> &nbsp;&nbsp;&nbsp;&nbsp;},<br /> <br /> &nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(lobObject,&nbsp;cb)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Helpers.logInfo('Number&nbsp;of&nbsp;bytes&nbsp;to&nbsp;write:&nbsp;'&nbsp;+&nbsp;2&nbsp;*&nbsp;CUBRIDClient._LOB_MAX_IO_LENGTH);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;data&nbsp;=&nbsp;new&nbsp;Buffer(2&nbsp;*&nbsp;CUBRIDClient._LOB_MAX_IO_LENGTH);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;(var&nbsp;i&nbsp;=&nbsp;0;&nbsp;i&nbsp;&lt;&nbsp;2&nbsp;*&nbsp;CUBRIDClient._LOB_MAX_IO_LENGTH;&nbsp;i++)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data[i]&nbsp;=&nbsp;i;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CUBRIDClient.lobWrite(lobObject,&nbsp;1,&nbsp;data,&nbsp;cb);<br /> &nbsp;&nbsp;&nbsp;&nbsp;},<br /> <br /> &nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(lobObject,&nbsp;written_length,&nbsp;cb)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CUBRIDClient.executeWithTypedParams('insert&nbsp;into&nbsp;test_blob&nbsp;values(1,&nbsp;?)',&nbsp;[lobObject],&nbsp;['blob'],&nbsp;cb);<br /> &nbsp;&nbsp;&nbsp;&nbsp;},<br /> &hellip;</div>
<p>And this is how we retrieve a LOB value:</p>
<div editor_component="code_highlighter" code_type="JScript" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">&hellip;<br /> &nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(cb)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CUBRIDClient.query('select&nbsp;*&nbsp;from&nbsp;test_lob',&nbsp;cb);<br /> &nbsp;&nbsp;&nbsp;&nbsp;},<br /> <br /> &nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(result,&nbsp;queryHandle,&nbsp;cb)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;arr&nbsp;=&nbsp;Result2Array.RowsArray(result);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;lobObject&nbsp;=&nbsp;arr[0][0];<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CUBRIDClient.lobRead(lobObject,&nbsp;1,&nbsp;lobObject.lobLength,&nbsp;cb);<br /> &nbsp;&nbsp;&nbsp;&nbsp;},<br /> <br /> &nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(str,&nbsp;read_length,&nbsp;cb)&nbsp;{<br /> &hellip;</div>
<p>(the str variable will contain the LOB data)</p>
<p>As you can see, it&rsquo;s pretty simple to deal with LOB data types!</p>
<h2>Database schema</h2>
<p>If you remember, in the previous driver versions, we provided integrated support for querying two database schemas:</p>
<ul>
<li>TABLEs</li>
<li>VIEWs</li>
</ul>
<p>But CUBRID provides many more and some of the information cannot be obtained by querying the system objects &ndash; see, for example, the foreign keys.</p>
<p>Therefore, one of the things we did in this release was to improve the support for database schema, and so we add support for:</p>
<ul>
<li>ATTRIBUTEs (Table columns)</li>
<li>CONSTRAINTs</li>
<li>PRIMARY KEYs</li>
<li>IMPORTED KEYs (Foreign keys)</li>
<li>EXPORTED KEYs</li>
<li>TABLE PRIVILEGEs</li>
</ul>
<p>The method which must be used to retrieve a database schema is:</p>
<p><span style="color: #008080;"><i>CUBRIDClient.getSchema(&hellip;)</i></span></p>
<p>Depending on schema, some method parameters might be mandatory!</p>
<p>For example, if you query the CONSTRAINTS schema, you need to provide the table name.</p>
<p>See the <a href="https://github.com/CUBRID/node-cubrid/blob/master/documentation/index.html">driver documentation</a> for more details.</p>
<p>Let&rsquo;s see an example for retrieving the list of foreign keys for a table (we will use the game table in the <a href="/wiki_tutorials/entry/getting-started-with-demodb-cubrid-demo-database">demodb</a> database):</p>
<p><img src="/files/attach/images/194379/729/617/athlete.png" alt="athlete.png" width="603" height="285" /></p>
<p>&nbsp;The code is pretty simple:</p>
<div editor_component="code_highlighter" code_type="JScript" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">ActionQueue.enqueue(<br /> &nbsp;&nbsp;[!<br /> &nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(callback)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CUBRIDClient.connect(callback);<br /> &nbsp;&nbsp;&nbsp;&nbsp;},<br /> <br /> &nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(callback)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Helpers.logInfo('Getting&nbsp;foreign&nbsp;keys&nbsp;for&nbsp;the&nbsp;game&nbsp;table...');<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CUBRIDClient.getSchema(CUBRIDClient.SCHEMA_IMPORTED_KEYS,&nbsp;'game',&nbsp;callback);<br /> &nbsp;&nbsp;&nbsp;&nbsp;},<br /> <br /> &nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(result,&nbsp;callback)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;(var&nbsp;i&nbsp;=&nbsp;0;&nbsp;i&nbsp;&lt;&nbsp;result.length;&nbsp;i++)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Helpers.logInfo(result[!i]);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CUBRIDClient.close(callback);<br /> &nbsp;&nbsp;&nbsp;&nbsp;}<br /> &nbsp;&nbsp;],<br /> &hellip;</div>
<p>And the output is:&nbsp;</p>
<div editor_component="code_highlighter" code_type="Plain" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">{&nbsp;FkName:&nbsp;'fk_game_event_code',<br /> &nbsp;&nbsp;PkName:&nbsp;'pk_event_code',<br /> &nbsp;&nbsp;FkTableName:&nbsp;'game',<br /> &nbsp;&nbsp;PkTableName:&nbsp;'event',<br /> &nbsp;&nbsp;FkColumnName:&nbsp;'event_code',<br /> &nbsp;&nbsp;PkColumnName:&nbsp;'code',<br /> &nbsp;&nbsp;UpdateAction:&nbsp;1,<br /> &nbsp;&nbsp;DeleteAction:&nbsp;1&nbsp;}<br /> {&nbsp;FkName:&nbsp;'fk_game_athlete_code',<br /> &nbsp;&nbsp;PkName:&nbsp;'pk_athlete_code',<br /> &nbsp;&nbsp;FkTableName:&nbsp;'game',<br /> &nbsp;&nbsp;PkTableName:&nbsp;'athlete',<br /> &nbsp;&nbsp;FkColumnName:&nbsp;'athlete_code',<br /> &nbsp;&nbsp;PkColumnName:&nbsp;'code',<br /> &nbsp;&nbsp;UpdateAction:&nbsp;1,<br /> &nbsp;&nbsp;DeleteAction:&nbsp;1&nbsp;}</div>
<p>Please note that some of the database schemas can be obtained very easily by querying the appropriate system table &ndash; you don&rsquo;t need the getSchema(&hellip;) method. For such schemas, we will not provide a dedicated functionality in the driver.</p>
<p>One simple example is the USERs schema, which can be obtained like this:</p>
<div editor_component="code_highlighter" code_type="JScript" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">ActionQueue.enqueue(<br /> &nbsp;&nbsp;[!<br /> &nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(callback)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CUBRIDClient.connect(callback);<br /> &nbsp;&nbsp;&nbsp;&nbsp;},<br /> <br /> &nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(callback)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CUBRIDClient.query('select&nbsp;[name]&nbsp;from&nbsp;db_user',&nbsp;callback);<br /> &nbsp;&nbsp;&nbsp;&nbsp;},<br /> <br /> &nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;(result,&nbsp;queryHandle,&nbsp;callback)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Helpers.logInfo(Result2Array.ColumnNamesArray(result).toString());<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;arr&nbsp;=&nbsp;Result2Array.RowsArray(result);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;(var&nbsp;i&nbsp;=&nbsp;0;&nbsp;i&nbsp;&lt;&nbsp;arr.length;&nbsp;i++)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Helpers.logInfo(arr[!i].toString());<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /> <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;callback();<br /> &nbsp;&nbsp;&nbsp;&nbsp;},<br /> &hellip;</div>
<p>When running this script on the <b>demodb </b>database, we will get the list of users defined in the <b>demodb</b>:</p>
<div editor_component="code_highlighter" code_type="Plain" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">name<br /> DBA<br /> PUBLIC</div>
<h2>Other features</h2>
<h3>Connection timeout</h3>
<p>One of the requests we got for the 2.0 driver release was to implement a connection timeout feature. Simply said - wait for the connection to the database to complete within the specified number of seconds and eventually throw an error if the timeout occurs.</p>
<p>Obviously, the key thing here was to set the connection timeout at the Node.js socket connection layer level (and not on the consumer level):</p>
<div editor_component="code_highlighter" code_type="JScript" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">self._socket&nbsp;=&nbsp;Net.createConnection(self.initialBrokerPort,&nbsp;self.brokerServer);<br /> self._socket.setNoDelay(true);<br /> self._socket.setTimeout(this._CONNECTION_TIMEOUT);</div>
<p>Now let&rsquo;s see this in action:</p>
<div editor_component="code_highlighter" code_type="JScript" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">var&nbsp;client&nbsp;=&nbsp;new&nbsp;CUBRIDConnection('10.255.255.1',&nbsp;33000,&nbsp;'public',&nbsp;'',&nbsp;'demodb');<br /> <br /> Helpers.logInfo(module.filename.toString()&nbsp;+&nbsp;'&nbsp;started...');<br /> <br /> client.setConnectionTimeout(2000);<br /> client.connect(function&nbsp;(err)&nbsp;{<br /> &nbsp;&nbsp;if&nbsp;(err)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;assert(err.message&nbsp;===&nbsp;ErrorMessages.ERROR_CONNECTION_TIMEOUT);<br /> &nbsp;&nbsp;&nbsp;&nbsp;Helpers.logInfo('Connection&nbsp;timeout');<br /> &hellip;</div>
<p>As you see, the timeout specified is 2.000, which is 2 sec.</p>
<p>After the 2 seconds, the script will timeout:</p>
<div editor_component="code_highlighter" code_type="Plain" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">Connection&nbsp;timeout<br /> Process&nbsp;finished&nbsp;with&nbsp;exit&nbsp;code&nbsp;0</div>
<h3>Extended events information</h3>
<p>Another thing we have enhanced in the 2.0 release is the events information provided to the user.</p>
<p>This is actually one of the key things we are constantly looking into improving in our driver &ndash; the events model &ndash; because we believe it provides many advantages over the &ldquo;classical&rdquo; callbacks programming model.</p>
<p>For example, the query() events now returns also the source SQL statement:</p>
<div editor_component="code_highlighter" code_type="JScript" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">CUBRIDClient.connect();<br /> <br /> CUBRIDClient.on(CUBRIDClient.EVENT_CONNECTED,&nbsp;function&nbsp;()&nbsp;{<br /> &nbsp;&nbsp;CUBRIDClient.addQuery(SQL_A,&nbsp;null);<br /> });<br /> <br /> CUBRIDClient.on(CUBRIDClient.EVENT_QUERY_DATA_AVAILABLE,&nbsp;function&nbsp;(result,&nbsp;queryHandle,&nbsp;sql)&nbsp;{</div>
<p>For more details about the events model, please take a look at the <a href="/manual/api/node.js/1.1/index.html">driver documentation</a>.</p>
<h3>Objects array</h3>
<p>Remember that in the version 1.0, when you we were retrieving the data returned by a query, we were accessing the data using an array notation:</p>
<div editor_component="code_highlighter" code_type="JScript" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">Helpers.logInfo(arr[!j][!0]&nbsp;+&nbsp;","&nbsp;+&nbsp;arr[!j][!1]&nbsp;+&nbsp;","&nbsp;+&nbsp;arr[!j][!2]&nbsp;+&nbsp;","&nbsp;+&nbsp;arr[!j][!2]);</div>
<p>Now, you can also do this - use an object notation:</p>
<div editor_component="code_highlighter" code_type="JScript" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">Helpers.logInfo(arr[!j].code&nbsp;+&nbsp;","&nbsp;+&nbsp;arr[!j].name&nbsp;+&nbsp;","&nbsp;+&nbsp;arr[!j].continent&nbsp;+&nbsp;","&nbsp;+&nbsp;arr[!j].capital);</div>
<p>Even if it looks easier to understand, we do not recommend using the object-type notation, unless you have good reasons. This is because of one reason &ndash; the syntax errors cannot be detected at development time, but only at runtime!</p>
<p>What we usually recommend instead is to use named-indexes in the array notation, for example:</p>
<div editor_component="code_highlighter" code_type="JScript" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">if&nbsp;(self._queriesQueue[!idx][!self._QUERY_INFO.CALLBACK]&nbsp;&amp;&amp;<br /> &nbsp;&nbsp;&nbsp;&nbsp;typeof(self._queriesQueue[!idx][!self._QUERY_INFO.CALLBACK])&nbsp;===&nbsp;'function')&nbsp;{</div>
<h2>Under the hood&hellip;</h2>
<p>In this section, we will look at some internal driver implementation details.</p>
<h3>The queue processor</h3>
<p>In order to have an &ldquo;automatic&rdquo; queue processor, which takes care of executing the statements the users added to the queue, we needed a way to implement a routine which could (auto-)execute in a recursive manner, but without blocking the events queue. And this without using a &ldquo;timer&rdquo;, because this is not available in Node.js.</p>
<p>Note: Just to clarify, when we say that the &ldquo;standard timer&rdquo; feature is not available in Node.js, we are referring to the Windows timer functionality, where you don&rsquo;t need to auto-call the recurrent function by yourself again and again, but you simply setup the timer function handler only once and the system takes care automatically of running it without any other actions required from the application.</p>
<p>Here is the logical structure of this routine we have developed:</p>
<div editor_component="code_highlighter" code_type="JScript" first_line="1" collapse="false" nogutter="false" style="border: #666 1px dotted; border-left: #2AE 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">//&nbsp;Check&nbsp;if&nbsp;some&nbsp;query&nbsp;is&nbsp;still&nbsp;in&nbsp;execution&nbsp;-&nbsp;if&nbsp;YES,&nbsp;exit&nbsp;and&nbsp;retry<br /> for&nbsp;(i&nbsp;=&nbsp;0;&nbsp;i&nbsp;&lt;&nbsp;self._queriesQueue.length;&nbsp;i++)&nbsp;{<br /> &nbsp;&nbsp;if&nbsp;(self._queriesQueue[!i][!self._QUERY_INFO.STATUS]&nbsp;===&nbsp;self._QUERY_STATUS.IN_EXECUTION)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;retry&nbsp;queue&nbsp;processing&nbsp;after&nbsp;a&nbsp;while<br /> &nbsp;&nbsp;&nbsp;&nbsp;setTimeout(function&nbsp;()&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self._enableQueriesBackgroundProcessor();<br /> &nbsp;&nbsp;&nbsp;&nbsp;},&nbsp;self._QUERIES_QUEUE_CHECK_INTERVAL);<br /> &nbsp;&nbsp;&nbsp;&nbsp;return;<br /> &nbsp;&nbsp;}<br /> }<br /> <br /> //&nbsp;Find&nbsp;the&nbsp;first&nbsp;query&nbsp;not&nbsp;started&nbsp;and&nbsp;execute&nbsp;it<br /> for&nbsp;(i&nbsp;=&nbsp;0;&nbsp;i&nbsp;&lt;&nbsp;self._queriesQueue.length;&nbsp;i++)&nbsp;{<br /> &nbsp;&nbsp;if&nbsp;(self._queriesQueue[!i][!self._QUERY_INFO.STATUS]&nbsp;===&nbsp;self._QUERY_STATUS.NOT_STARTED)&nbsp;{<br /> &nbsp;&nbsp;&nbsp;&nbsp;...<br /> &nbsp;&nbsp;&nbsp;&nbsp;break;<br /> &nbsp;&nbsp;}<br /> }<br /> <br /> //&nbsp;Re-start&nbsp;queries&nbsp;processor<br /> setTimeout(function&nbsp;()&nbsp;{<br /> &nbsp;&nbsp;self._enableQueriesBackgroundProcessor();<br /> },&nbsp;self._QUERIES_QUEUE_CHECK_INTERVAL);</div>
<p><b>Tip</b>: As you can see there is an internal parameter - <span style="color: #008080;"><em>_QUERIES_QUEUE_CHECK_INTERVAL</em></span> - which controls after which interval the routine restart itself. The default value is 1.000 msec. If for some reason, you need a &ldquo;faster&rdquo; queue, you can lower down the values of this parameter, for example:</p>
<p><em><span style="color: #008080;">&lt;your_CUBRIDConnection_client_instance_name&gt;._QUERIES_QUEUE_CHECK_INTERVAL = 500;</span></em></p>
<h3>Some backward compatibility notes</h3>
<p>Maybe you have asked if the &ldquo;old&rdquo; query(&hellip;) statement is still available&hellip;</p>
<p>The short answer is: Yes, it is still there in the driver and not only as an empty &ldquo;shell&rdquo;, but complete - nothing was changed in its implementation.</p>
<p>We made this choice for a couple of reasons:</p>
<ul>
<li>Not everybody will actually need the queries queue functionality</li>
<li>Executing a query using the &rdquo;old&rdquo; query(&hellip;) function is slighter faster and uses lesser resources. The reason is obvious &ndash; you will be bypassing entirely the queue processor.</li>
</ul>
<p>Tip: Before you start coding, think about if you need the queue processor and make the best decision for your applications. Remember, there are 3 main ways to use the driver:</p>
<ul>
<li>Through the queries queue</li>
<li>Through the ActionQueue (or any similar implementation, &nbsp;see Async for example)</li>
<li>Using simple &ldquo;callback-chained&ldquo; queries</li>
</ul>
<h2>References and links</h2>
<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse; mso-table-layout-alt: fixed; border: none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 160; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext;">
<tbody>
<tr>
<td width="163" valign="top" style="width: 1.7in; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt;">
<p class="MsoNoSpacing">CUBRID Node.js driver home page<o:p></o:p></p>
</td>
<td width="453" valign="top" style="width: 339.75pt; border: solid windowtext 1.0pt; border-left: none; mso-border-left-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt;">
<p class="MsoNoSpacing"><a href="https://github.com/CUBRID/node-cubrid">https://github.com/CUBRID/node-cubrid</a> <o:p></o:p></p>
<p class="MsoNoSpacing"><a href="https://github.com/organizations/CUBRID">https://github.com/organizations/CUBRID</a> <o:p></o:p></p>
</td>
</tr>
<tr>
<td width="163" valign="top" style="width: 1.7in; border: solid windowtext 1.0pt; border-top: none; mso-border-top-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt;">
<p class="MsoNoSpacing">Online driver documentation<o:p></o:p></p>
</td>
<td width="453" valign="top" style="width: 339.75pt; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; mso-border-top-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt;">
<p class="MsoNoSpacing"><a href="https://github.com/CUBRID/node-cubrid/tree/master/documentation">https://github.com/CUBRID/node-cubrid/tree/master/documentation</a> <o:p></o:p></p>
</td>
</tr>
<tr>
<td width="163" valign="top" style="width: 1.7in; border: solid windowtext 1.0pt; border-top: none; mso-border-top-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt;">
<p class="MsoNoSpacing">Online Wiki<o:p></o:p></p>
</td>
<td width="453" valign="top" style="width: 339.75pt; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; mso-border-top-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt;">
<p class="MsoNoSpacing"><a href="/wiki_apis/entry/cubrid-node-js-driver">http://www.cubrid.org/wiki_apis/entry/cubrid-node-js-driver</a> <o:p></o:p></p>
</td>
</tr>
<tr>
<td width="163" valign="top" style="width: 1.7in; border: solid windowtext 1.0pt; border-top: none; mso-border-top-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt;">
<p class="MsoNoSpacing">Driver tutorials and examples<o:p></o:p></p>
</td>
<td width="453" valign="top" style="width: 339.75pt; border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; mso-border-top-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt;">
<p class="MsoNoSpacing"><a href="/wiki_apis/entry/cubrid-node-js-tutorials">http://www.cubrid.org/wiki_apis/entry/cubrid-node-js-tutorials</a></p>
</td>
</tr>
</tbody>
</table>
<p>We hope you enjoyed this tutorial!</p>
<p>Please let us know your feedback and suggestions, so we can improve! And do not forget, tryout the CUBRID Node.js 2.0 driver!</p>]]></description>
                        <pubDate>Thu, 21 Mar 2013 02:03:11 -0800</pubDate>
                        <category>node.js</category>
                        <category>node.js 2.0</category>
                        <category>tutorial</category>
                                </item>
        										        <item>
            <title>CUBRID ADO.NET Driver</title>
            <dc:creator>newpcraft</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=ADO.NET-driver</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=ADO.NET-driver</guid>
                                    <description><![CDATA[<p>CUBRID ADO.NET driver is now available for <a target="_self" href="/?mid=downloads&amp;item=ado_dot_net_driver&amp;os=windows">download</a>.</p>
<div class="grid col2"><span> 
<ul>
<li><a target="_self" href="/?mid=downloads&amp;item=ado_dot_net_driver&amp;os=windows">Download</a></li>
<li>[cubrid-ado-net-driver-installation-guide|Installation Instructions]</li>
<li>[cubrid-ado-net-tutorials|Latest News, Guides and Tutorials]</li>
<li><a target="_self" href="/questions">Questions&nbsp;and Answers</a></li>
</ul>
</span> <span> 
<ul>
<li><a href="ftp://ftp.cubrid.org/CUBRID_Docs/Drivers/ADO.NET/9.1.0/annotated.html">Documentation</a></li>
<li>[cubrid-ado-net-release-notes|Release Notes]</li>
<li>[ADO.NET-driver-development-notes|Development Notes]</li>
<li><a target="_self" href="http://jira.cubrid.org/browse/APIS/component/10404">JIRA Issue Tracker</a></li>
<li><a href="http://svn.cubrid.org/cubridapis/adodotnet/branches/RB-9.1.0/">SVN</a></li>
</ul>
</span></div>
<p>ADO.NET driver source code is&nbsp;distributed under the terms of&nbsp;<a target="_self" href="/bsd_license">BSD open source license</a>.</p>]]></description>
                        <pubDate>Tue, 06 Dec 2011 17:24:55 -0800</pubDate>
                        <category>ado.net</category>
                        <category>driver</category>
                                </item>
        										        <item>
            <title>cubrid-python-driver-8-4-3-release-note</title>
            <dc:creator>James</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-python-driver-8-4-3-release-note</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-python-driver-8-4-3-release-note</guid>
                                    <description><![CDATA[<div class="vimiumReset vimiumHUD" style="right: 150px; opacity: 0; display: none;"></div>
<div class="vimiumReset vimiumHUD" style="right: 150px; opacity: 0; display: none;"></div>
<p>&nbsp;</p>
<table style="background: #cccccc;" cellspacing="2">
<tbody>
<tr style="background: #FFFFFF;">
<td>
<p><b>8.4.3.0004</b></p>
</td>
<td>
<h3>Fixed bugs:</h3>
<ul>
<li><a href="http://jira.cubrid.org/browse/APIS-522" target="_self">APIS-522</a>: Fix the date_format error in django_cubrid.</li>
<li><a href="http://jira.cubrid.org/browse/APIS-523" target="_self">APIS-523</a>: Fix the 'LIMIT' format error in django_cubrid.</li>
</ul>
</td>
</tr>
<tr style="background: #FFFFFF;">
<td>
<p><b>8.4.3.0003</b></p>
</td>
<td>
<h3>Fixed bugs:</h3>
<ul>
<li><a href="http://jira.cubrid.org/browse/APIS-428" target="_self">APIS-428</a>: Change the setup.py to fix the pip installation failure..</li>
<li><a href="http://jira.cubrid.org/browse/APIS-433" target="_self">APIS-426</a>: Remove free() in insert_id function for Windows platform: merge from trunk</li>
<li><a href="http://jira.cubrid.org/browse/APIS-444" target="_self">APIS-419</a>: Fix Py_ssize_t undefined problem in Python-2.4. This bug causes 8.4.3.0002 fail to build in Python 2.4.</li>
</ul>
</td>
</tr>
<tr style="background: #FFFFFF;">
<td>
<p><b>8.4.3.0002</b></p>
</td>
<td>
<h3>Django backend Features:</h3>
<p>In this version, the django support is developed. Django_cubrid is the django backend for CUBRID Database.</p>
<ol>
<li>Overview</li>
Django_cubrid is the official Django backend for CUBRID Database. When using Django web framework with CUBRID database, the django_cubrid backend should be used.
<li>Prerequisites</li>
<p><b>* Python</b></p>
Being a Python Web framework, Django requires Python. It works with any Python version from 2.5 to 2.7 (due to backwards incompatibilities in Python 3.0,  Django does not currently work with Python 3.0).<br /> So, when using django_cubrid, the Python version should be from 2.5 to 2.7.
<p><b>* Django</b></p>
Now only supports Django-1.4.  It's tested in Django-1.4.2.
<li>Known issues</li>
<p>* The Django sqlflush command maybe failed because of the foreign constraints between database tables.<br /><br /> * After using the Django loaddata command, the insert SQL manipulation in the application maybe failed, becuse of the auto_increment field.<br /><br /> * Perhaps you may encounter the below warning: <br /> <i>RuntimeWarning: DateTimeField received a naive datetime (2013-01-15 06:38:37.463000) while time zone support is active. </i> <br /> The reason is that CUBRID dosen't support timezone. You can set "USE_TZ" to False in settings.py to avoid this warning.</p>
<li>Refer to <a href="/wiki_apis/entry/how-to-use-django-with-cubrid"><i>How to use Django with CUBRID</i></a> for more infomation.</li>
</ol>
<h3>Changed and Enhanced Features:</h3>
<ol>
<li>support designated charset in the key-value arguments of connect()</li>
<li>add the mult-byte character support for the data in CUBRID</li>
<li>support bind NULL value to sql statement</li>
<li>support bind unicode string to sql statement</li>
<li>support bind integer to sql statement</li>
<li>add the iteration feature for cursor object.</li>
<li>update the samples</li>
<li>update the README file</li>
<li>move the unit test cases into tests/</li>
</ol>
<h3>Fixed bugs:</h3>
<ul>
<li><a href="http://jira.cubrid.org/browse/APIS-423" target="_self">APIS-423</a>: Access the major version and minor version from sys.version_info by indexing.</li>
<li><a href="http://jira.cubrid.org/browse/APIS-426" target="_self">APIS-426</a>: The unicode keyword isn't supported in cursor() when using Python-3.x</li>
<li><a href="http://jira.cubrid.org/browse/APIS-419" target="_self">APIS-419</a>: Add break in the switch in the _cubrid_ConnectionObject_schema_to_pyvalue().</li>
</ul>
</td>
</tr>
<tr style="background: #FFFFFF;">
<td>
<p><b>8.4.3.0001</b></p>
</td>
<td>
<h3>Fixed bugs:</h3>
<ul>
<li><a href="http://jira.cubrid.org/browse/APIS-181" target="_self">APIS-181</a>: A lot of error messages will appear when sql statements is "select * from db_user".</li>
<li><a href="http://jira.cubrid.org/browse/APIS-232" target="_self">APIS-232</a>: added escape_string() to python driver.</li>
<li><a href="http://jira.cubrid.org/browse/APIS-348" target="_self">APIS-348</a>:add set_autocommit() and get_autocommit() in CUBRIDdb.</li>
<li><a href="http://jira.cubrid.org/browse/APIS-368" target="_self">APIS-368</a>: Add the DatabaseError and InterfaceError exception.</li>
<li><a href="http://jira.cubrid.org/browse/APIS-369" target="_self">APIS-369</a>:deal with None object when binding None.</li>
<li><a href="http://jira.cubrid.org/browse/APIS-373" target="_self">APIS-373</a>: Convert NUMERIC type in CUBRID to decimal.Decimal in Python.</li>
</ul>
</td>
</tr>
</tbody>
</table>]]></description>
                        <pubDate>Fri, 16 Nov 2012 00:08:27 -0800</pubDate>
                        <category>python</category>
                        <category>release note</category>
                        <category>driver</category>
                                </item>
        										        <item>
            <title>CUBRID Python Driver 9.1.0 release note</title>
            <dc:creator>James</dc:creator>
            <link>http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-python-driver-9-1-0-release-note</link>
            <guid isPermaLink="true">http://www.cubrid.org/?mid=wiki_apis&amp;entry=cubrid-python-driver-9-1-0-release-note</guid>
                                    <description><![CDATA[<div class="vimiumReset vimiumHUD" style="right: 150px; opacity: 0; display: none;"></div>
<p>&nbsp;</p>
<table style="background: #cccccc;" cellspacing="2">
<tbody>
<tr style="background: #FFFFFF;">
<td>
<p><b>9.1.0.0002</b></p>
</td>
<td>
<h3>Fixed bugs:</h3>
<ul>
<li><a href="http://jira.cubrid.org/browse/APIS-522" target="_self">APIS-522</a>: Fix the date_format error in django_cubrid.</li>
<li><a href="http://jira.cubrid.org/browse/APIS-523" target="_self">APIS-523</a>: Fix the 'LIMIT' format error in django_cubrid.</li>
</ul>
</td>
</tr>
<tr style="background: #FFFFFF;">
<td>
<p><b>9.1.0.0001</b></p>
</td>
<td>
<h3>Django backend Features:</h3>
<p>In this version, the django support is developed. Django_cubrid is the django backend for CUBRID Database.</p>
<ol>
<li>Overview</li>
Django_cubrid is the official Django backend for CUBRID Database. When using Django web framework with CUBRID database, the django_cubrid backend should be used.
<li>Prerequisites</li>
<p><b>* Python</b></p>
Being a Python Web framework, Django requires Python. It works with any Python version from 2.5 to 2.7 (due to backwards incompatibilities in Python 3.0,  Django does not currently work with Python 3.0).<br /> So, when using django_cubrid, the Python version should be from 2.5 to 2.7.
<p><b>* Django</b></p>
Now supports Django-1.4 and Django-1.5, not support Django-1.3.
<li>Known issues</li>
<p>* The Django sqlflush command maybe failed because of the foreign constraints between database tables.<br /><br /> * After using the Django loaddata command, the insert SQL manipulation in the application maybe failed, becuse of the auto_increment field.<br /><br /> * Perhaps you may encounter the below warning: <br /> <i>RuntimeWarning: DateTimeField received a naive datetime (2013-01-15 06:38:37.463000) while time zone support is active. </i> <br /> The reason is that CUBRID dosen't support timezone. You can set "USE_TZ" to False in settings.py to avoid this warning.</p>
<li>Refer to <a href="/wiki_apis/entry/how-to-use-django-with-cubrid"><i>How to use Django with CUBRID</i></a> for more infomation.</li>
</ol>
<h3>Changed and Enhanced Features:</h3>
<ol>
<li>Support designated charset in the key-value arguments of connect()</li>
<li>Add the mult-byte character support for the data in CUBRID</li>
<li>Support bind NULL value to sql statement</li>
<li>Support bind unicode string to sql statement</li>
<li>Support bind integer to sql statement</li>
<li>Add the iteration feature for cursor object.</li>
<li>Update the samples</li>
<li>Update the README file</li>
<li>Move the unit test cases into tests/</li>
<li>Enable cci_connect_with_url_ex(), cci_escape_string() in Windows platfrom</li>
</ol>
<h3>Fixed bugs:</h3>
<ul>
<li><a href="http://jira.cubrid.org/browse/APIS-423" target="_self">APIS-423</a>: Access the major version and minor version from sys.version_info by indexing.</li>
<li><a href="http://jira.cubrid.org/browse/APIS-426" target="_self">APIS-426</a>: The unicode keyword isn't supported in cursor() when using Python-3.x</li>
<li><a href="http://jira.cubrid.org/browse/APIS-419" target="_self">APIS-419</a>: Add break in the switch in the _cubrid_ConnectionObject_schema_to_pyvalue().</li>
<li><a href="http://jira.cubrid.org/browse/APIS-428" target="_self">APIS-428</a>: Change the setup.py to fix the pip installation failure..</li>
<li><a href="http://jira.cubrid.org/browse/APIS-433" target="_self">APIS-433</a>: Fix the memory leak when using insert_id function in Windows platform</li>
<li><a href="http://jira.cubrid.org/browse/APIS-444" target="_self">APIS-444</a>: Fix Py_ssize_t undefined problem in Python-2.4. This bug causes 8.4.3.0002 fail to build in Python 2.4.</li>
<li><a href="http://jira.cubrid.org/browse/APIS-403" target="_self">APIS-403</a>: Improve the invoking of cci_disconnect().</li>
<li><a href="http://jira.cubrid.org/browse/APIS-419" target="_self">APIS-419</a>: Add break in the switch in the _cubrid_ConnectionObject_schema_to_pyvalue().</li>
<li><a href="http://jira.cubrid.org/browse/APIS-471" target="_self">APIS-471</a>: Check the parameter of set_autocommit() is or not a bool.</li>
<li><a href="http://jira.cubrid.org/browse/APIS-473" target="_self">APIS-473</a>: Remove as_sql() and create_test_db() in django_cubrid to support Django-1.5.</li>
<li><a href="http://jira.cubrid.org/browse/APIS-482" target="_self">APIS-482</a>: Fix the bug when reuse a closed connection to create a cursor.</li>
</ul>
</td>
</tr>
</tbody>
</table>]]></description>
                        <pubDate>Fri, 15 Mar 2013 02:34:36 -0800</pubDate>
                        <category>release note</category>
                        <category>python</category>
                        <category>cubrid</category>
                                </item>
            </channel>
</rss>
