<?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 Q&amp;A</title>
        <link>http://www.cubrid.org/?mid=questions</link>
        <description>CUBRID Q&amp;A</description>
        <language>en</language>
        <pubDate>Fri, 21 Oct 2011 02:37:10 -0800</pubDate>
        <lastBuildDate>Mon, 20 May 2013 01:15:17 -0800</lastBuildDate>
        <generator>XpressEngine 1.4.4.1</generator>
                        										        <item>
            <title>Error: The argument is invalid</title>
            <dc:creator>Laura Oh</dc:creator>
            <link>http://www.cubrid.org/questions/490836</link>
            <guid isPermaLink="true">http://www.cubrid.org/questions/490836</guid>
                                    <description><![CDATA[<p>

When I execute a query "SELECT * FROM t_info" on Java application thru CUBRID JDBC, <br />an error "The argument is invalid" popped up. I'd like to know what&nbsp;happened and how I handle. </p>

<p>&nbsp;</p>

<p>&nbsp;</p>]]></description>
                        <pubDate>Thu, 15 Nov 2012 19:21:04 -0800</pubDate>
                        <category>SQL</category>
                        <category>Error Code</category>
                        <category>JDBC</category>
                        <category>Java</category>
                                    <slash:comments>1</slash:comments>
                    </item>
        										        <item>
            <title>JDBC: Cannot coerce host var to type nchar</title>
            <dc:creator>vbergmann</dc:creator>
            <link>http://www.cubrid.org/questions/329488</link>
            <guid isPermaLink="true">http://www.cubrid.org/questions/329488</guid>
                                    <description><![CDATA[I created a test table with all *char types supported by CUBRID.<br />
<br />
When using JDBC to persist a row in which each column is set to a string
 value containing only uppercase latin letters (e.g. char_col=KFX, 
varchar_col=J, nchar_col=XZDFOY, nchar_varying_col=YYCY), I get the 
following exception:<br />
<br />
<div style='background: url("./modules/editor/components/code_highlighter/code.png") no-repeat right top rgb(250, 250, 250); border-width: 1px 1px 1px 5px; border-style: dotted dotted dotted solid; border-color: rgb(102, 102, 102) rgb(102, 102, 102) rgb(102, 102, 102) rgb(34, 170, 238); padding: 5px;' description="" nocontrols="false" nogutter="false" collapse="false" first_line="1" file_path="" code_type="Java" editor_component="code_highlighter">Caused by: cubrid.jdbc.driver.CUBRIDException: Semantic: Cannot coerce host var to type nchar.<br />
&nbsp;&nbsp;&nbsp; at cubrid.jdbc.driver.CUBRIDConnection.createCUBRIDException(CUBRIDConnection.java:829)<br />
&nbsp;&nbsp;&nbsp; at cubrid.jdbc.driver.CUBRIDStatement.checkExecuteError(CUBRIDStatement.java:941)<br />
&nbsp;&nbsp;&nbsp; at cubrid.jdbc.driver.CUBRIDStatement.executeCoreInternal(CUBRIDStatement.java:830)<br />
&nbsp;&nbsp;&nbsp; at cubrid.jdbc.driver.CUBRIDStatement.executeCore(CUBRIDStatement.java:791)<br />
&nbsp;&nbsp;&nbsp; at cubrid.jdbc.driver.CUBRIDPreparedStatement.executeUpdate(CUBRIDPreparedStatement.java:140)<br />
&nbsp;&nbsp;&nbsp; at org.databene.platform.db.DBSystem.persistOrUpdate(DBSystem.java:867)<br />
&nbsp;&nbsp;&nbsp; ... 44 more&nbsp;</div>

<p>The code that provoked the error was something like this:<br />
</p>

<div style='background: url("./modules/editor/components/code_highlighter/code.png") no-repeat right top rgb(250, 250, 250); border-width: 1px 1px 1px 5px; border-style: dotted dotted dotted solid; border-color: rgb(102, 102, 102) rgb(102, 102, 102) rgb(102, 102, 102) rgb(34, 170, 238); padding: 5px;' description="" nocontrols="false" nogutter="false" collapse="false" first_line="1" file_path="" code_type="Java" editor_component="code_highlighter">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PreparedStatement statement = ...;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; statement.setObject(1, "KFX");<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; statement.setObject(2, "J");<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; statement.setObject(3, "XZDFOY");<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; statement.setObject(4, "YYCY");<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int rowCount = statement.executeUpdate();</div>

<p>
</p>

<p>The table definition is<br />
</p>

<div style='background: url("./modules/editor/components/code_highlighter/code.png") no-repeat right top rgb(250, 250, 250); border-width: 1px 1px 1px 5px; border-style: dotted dotted dotted solid; border-color: rgb(102, 102, 102) rgb(102, 102, 102) rgb(102, 102, 102) rgb(34, 170, 238); padding: 5px;' description="" nocontrols="false" nogutter="false" collapse="false" first_line="1" file_path="" code_type="Sql" editor_component="code_highlighter">&nbsp;&nbsp;&nbsp; create table chartest (<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char_col&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char(4) not null,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; varchar_col&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; varchar(8) not null,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nchar_col&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nchar(6) not null,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nchar_varying_col nchar varying(10) not null<br />
&nbsp;&nbsp;&nbsp; );</div>
<br />
What's wrong?<br />
<br />
Regards, Volker]]></description>
                        <pubDate>Wed, 18 Apr 2012 07:01:55 -0800</pubDate>
                        <category>JDBC</category>
                        <category>SQL</category>
                        <category>N</category>
                        <category>VAR</category>
                        <category>Error Code</category>
                                    <slash:comments>2</slash:comments>
                    </item>
        										        <item>
            <title>How can you get the query string from a CUBRIDPreparedStatement?</title>
            <dc:creator>ovidiuv</dc:creator>
            <link>http://www.cubrid.org/questions/412851</link>
            <guid isPermaLink="true">http://www.cubrid.org/questions/412851</guid>
                                    <description><![CDATA[<div>According to other websites, you can obtain the query string for a PreparedStatement using its toString method:</div><div><a href="http://stackoverflow.com/questions/2683214/get-query-from-java-sql-preparedstatement" target="_self">http://stackoverflow.com/questions/2683214/get-query-from-java-sql-preparedstatement</a></div><div><br /></div><div>For CUBRID however, it only displays:</div><div>cubrid.jdbc.driver.CUBRIDPreparedStatement@500b73e5</div><div><br /></div><div>Is there a way to view the query that it contains (after variables have been binded for example) ?</div>]]></description>
                        <pubDate>Tue, 21 Aug 2012 04:38:57 -0800</pubDate>
                        <category>JDBC</category>
                                    <slash:comments>1</slash:comments>
                    </item>
        										        <item>
            <title>Java Stored Procedure: Invalid call: it can not return ResultSet</title>
            <dc:creator>castle79</dc:creator>
            <link>http://www.cubrid.org/questions/357535</link>
            <guid isPermaLink="true">http://www.cubrid.org/questions/357535</guid>
                                    <description><![CDATA[<p>I am running the following example in my cubrid database.</p><p class="codep">function:</p><p class="codep"></p>

<div editor_component="code_highlighter" code_type="Sql" file_path="" description="" 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;">create function rset() return cursor<br />as language java<br />name 'JavaSP2.TResultSet() return java.sql.ResultSet'</div>

<p class="codep">Stored procedure:</p><p class="codep"></p><div editor_component="code_highlighter" code_type="Java" file_path="" description="" 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;">public static class JavaSP2 {<br />public static ResultSet TResultSet(){<br /><br />try{<br />Class.forName("cubrid.jdbc.driver.CUBRIDDriver");<br />Connection conn = DriverManager.getConnection("jdbc:default:connection:");<br />((CUBRIDConnection)con).setCharset("euc_kr");<br /><br />String sql = "select * from station";<br />Statement stmt=con.createStatement();<br />ResultSet rs = stmt.executeQuery(sql);<br />((CUBRIDResultSet)rs).setReturnable();<br /><br />return rs;<br />} catch (Exception e) {<br />e.printStackTrace();<br />}<br />return null;<br />}<br />}&nbsp;</div><p class="codep">CUBRID says:&nbsp;&nbsp;&nbsp; </p><p class="codep"></p><div editor_component="code_highlighter" code_type="Java" file_path="" description="" 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;"><p class="codep">execute error:-911<br />line 1 is not executed (error)</p><p class="codep">Error description:<br />Invalid call: it can not return ResultSet.&nbsp;</p></div><p class="codep">I try to solve it doing casting but dont work. When I registering the function cubrid dont allow set&nbsp; <strong>java.sql.ResultSet</strong> as return value instead use </p><p class="codep"></p><div editor_component="code_highlighter" code_type="Sql" file_path="" description="" 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;">CREATE FUNCTION "rset"() RETURN CURSOR<br />AS LANGUAGE JAVA <br />NAME 'JavaSP2.TResultSet() return <strong>cubrid.jdbc.driver.CUBRIDResultSet'</strong></div><strong></strong><p></p><div id="endic_ext_wrapper" style="display: none; "></div><div id="endic_ext_wrapper" style="display: none; "></div><div id="endic_ext_wrapper" style="display: none; "></div><div id="endic_ext_wrapper" style="display: none; "></div>]]></description>
                        <pubDate>Fri, 11 May 2012 04:59:17 -0800</pubDate>
                        <category>JDBC</category>
                        <category>SQL</category>
                        <category>Stored Procedure</category>
                                    <slash:comments>1</slash:comments>
                    </item>
        										        <item>
            <title>How to make JDBC driver fail faster if server is down?</title>
            <dc:creator>vbergmann</dc:creator>
            <link>http://www.cubrid.org/questions/329746</link>
            <guid isPermaLink="true">http://www.cubrid.org/questions/329746</guid>
                                    <description><![CDATA[<p>When trying to connect a server which is down, CUBRID hangs for a long time (at least several minutes) before finally reporting that the host cannot be reached. This is quite annoying when testing. Is there a way to make it respond faster? Setting a timeout? For example a connect property?<br /></p><p>The code I used:<br /></p><p></p><div editor_component="code_highlighter" code_type="Java" file_path="" description="" 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;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Class&lt;Driver&gt; driverClass = BeanUtil.forName(driverClassName);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Driver driver = driverClass.newInstance();<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; java.util.Properties info = new java.util.Properties();<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; info.put("user", "xyz");<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; info.put("password", "xyz");<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Connection connection = driver.connect(url, info);</div><p></p><p>Regards,</p><p>Volker<br /></p>]]></description>
                        <pubDate>Wed, 18 Apr 2012 20:31:32 -0800</pubDate>
                        <category>JDBC</category>
                        <category>connection string</category>
                        <category>timeout</category>
                        <category>connection</category>
                                    <slash:comments>1</slash:comments>
                    </item>
        										        <item>
            <title>Tools that generate CUBRID code for Java</title>
            <dc:creator>impega</dc:creator>
            <link>http://www.cubrid.org/questions/234895</link>
            <guid isPermaLink="true">http://www.cubrid.org/questions/234895</guid>
                                    <description><![CDATA[<p>


Hi! Are there any tools that could be used to automatically generate Java/JDBC code working with CUBRID?</p><p>For exampe, something like:</p><p><a href="http://platform.netbeans.org/tutorials/nbm-crud.html">http://platform.netbeans.org/tutorials/nbm-crud.html</a></p><p>Or any tool which I can use to generate the right CUBRID java code without having to learn all the jdbc driver "internals", so to say...</p>]]></description>
                        <pubDate>Fri, 04 Nov 2011 02:23:54 -0800</pubDate>
                        <category>Tools</category>
                        <category>Java</category>
                        <category>JDBC</category>
                        <category>CRUD</category>
                                    <slash:comments>1</slash:comments>
                    </item>
        										        <item>
            <title>Multiple CUBRID Instances</title>
            <dc:creator>dolph</dc:creator>
            <link>http://www.cubrid.org/questions/235384</link>
            <guid isPermaLink="true">http://www.cubrid.org/questions/235384</guid>
                                    <description><![CDATA[<p>I can see in jdbc help manual that you can login to alternative servers.</p><p>Can multiple instances of CUBRID run on the same machine? Also, can you please describe the setup?</p>]]></description>
                        <pubDate>Sat, 05 Nov 2011 11:13:29 -0800</pubDate>
                        <category>JDBC</category>
                        <category>HA</category>
                        <category>alternative host</category>
                                    <slash:comments>1</slash:comments>
                    </item>
        										        <item>
            <title>CUBRID JDBC url</title>
            <dc:creator>eusto</dc:creator>
            <link>http://www.cubrid.org/questions/236982</link>
            <guid isPermaLink="true">http://www.cubrid.org/questions/236982</guid>
                                    <description><![CDATA[<p>What is the CUBRID JDBC URL connection string?</p>]]></description>
                        <pubDate>Thu, 10 Nov 2011 04:59:44 -0800</pubDate>
                        <category>JDBC</category>
                        <category>driver</category>
                                    <slash:comments>1</slash:comments>
                    </item>
            </channel>
</rss>
