Hello Kubo さん、<br><br>In the following link its mentioned that the test values for date type is passed as <br><b>'2010-03-31 12:34:56'</b><br> <br><a href="http://dbflute.sandbox.seasar.org/ja/manual/function/generator/task/sql2entity/procedurepmb.html#resultsethandling">http://dbflute.sandbox.seasar.org/ja/manual/function/generator/task/sql2entity/procedurepmb.html#resultsethandling</a><br>
<br><br>when i run Sql2Entity its trying to assign 0 for date parameter.so i got "converting data type nvarchar to date" Error.<br><br>Is this my procedure problem?Or i have to do some other settings?<br><br>Thanks,<br>
Thomas<br><br><br><br>2010-06-11 14:56:41,578 [main] INFO (DfProcedureExecutionMetaExtractor#doExtractExecutionMetaData():100) - ...Calling: {? = call PMS_COM_MONTH_CLOSE_CHECK_FN(?, ?, ?)}<br>2010-06-11 14:56:41,578 [main] INFO (DfProcedureExecutionMetaExtractor#doExtractExecutionMetaData():123) - (x) retry: ? = call PMS_COM_MONTH_CLOSE_CHECK_FN(?, ?, ?)<br>
2010-06-11 14:56:41,578 [main] INFO (DfProcedureExecutionMetaExtractor#doExtractExecutionMetaData():177) - *Failed to execute the procedure for getting meta data:<br> {? = call PMS_COM_MONTH_CLOSE_CHECK_FN(?, ?, ?)}<br> @RETURN_VALUE: int(10) as Return<br>
<b>@Date: date(10) as In</b><br> @Fiscal_year: int(10) as In<br> @Fiscal_month: int(10) as In<br><b> test values = [0, 0, 0]</b><br> Error converting data type nvarchar to date.<br><br><br><br><br><div class="gmail_quote">
On Fri, Jun 11, 2010 at 2:40 PM, kubo <span dir="ltr"><<a href="mailto:dbflute@gmail.com">dbflute@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Good afternoon, thomas<br>
<br>
Success:<br>
<div class="im"><br>
DBFLUTE_CLIENT: {dfclient}<br>
database = mssql (Microsoft SQL Server 10.00.1600)<br>
<br>
</div>Failure:<br>
<br>
DBFLUTE_CLIENT: {dfclient}<br>
database = h2 (Microsoft SQL Server 10.00.1600)<br>
<br>
Change the database type "h2 to mssql"<br>
at "dfprop/basicInfoMap.dfprop".<br>
<br>
And when you upgrade DBFlute,<br>
you don't need to remake DBFlute client directory.<br>
<br>
{Pattern 1}<br>
/= = = = = = = = = = = = = = = = = = = = = = = = = =<br>
dbflute_dfclient<br>
|-dfprop // no change<br>
|-_project.bat // *change the path to new version<br>
|-_project.sh // *change the path to new version<br>
|-...others // no change<br>
<br>
mydbflute<br>
|-dbflute-0.9.7.1-06-SNAPSHOT<br>
|-dbflute-0.9.7.1-07-SNAPSHOT // *put new module here<br>
<br>
ex) _project.sh<br>
export DBFLUTE_HOME=../mydbflute/dbflute-0.9.7.1-06-SNAPSHOT<br>
to<br>
export DBFLUTE_HOME=../mydbflute/dbflute-0.9.7.1-07-SNAPSHOT<br>
= = = = = = = = = =/<br>
<br>
{Pattern 2}<br>
= = = = = = = = = = = = = = = = = = = = = = = = = = = =<br>
dbflute_dfclient<br>
|-dfprop // no change<br>
|-_project.bat // no change (to 0.9.7.1)<br>
|-_project.sh // no change (to 0.9.7.1)<br>
|-...others // no change<br>
<br>
mydbflute<br>
|-dbflute-0.9.7.1 // *override all files<br>
= = = = = = = = = =/<br>
<br>
2010/6/11 thomas <<a href="mailto:jp.mcy.10@gmail.com">jp.mcy.10@gmail.com</a>>:<br>
<div><div></div><div class="h5">> Hello Kubo さん、<br>
><br>
> I downloaded the DBFlute-0.9.7.1-07-SNAPSHOT and i tried,its not connected<br>
> to the database itself.<br>
><br>
> while running jdbc.bat file the connection failed.<br>
><br>
> If i use DBFlute-0.9.7.1-06-SNAPSHOT it is connecting.I am using same<br>
> connection String<br>
><br>
> jdbc:sqlserver://localhost;DatabaseName=MYTEST<br>
><br>
> and i am using sqljdbc4.jar.<br>
><br>
> I have attached the log file for both versions.<br>
><br>
> What i am doing wrong here?<br>
><br>
> Thanks,<br>
> Tomas.<br>
><br>
> 2010/6/11 kubo <<a href="mailto:dbflute@gmail.com">dbflute@gmail.com</a>><br>
>><br>
>> Good morning, thomas<br>
>><br>
>> I've got it! Thank you.<br>
>> I remembered SQLServer's function<br>
>> and it can return a table type.<br>
>><br>
>> I could get the same exception in my environment.<br>
>> I'm surprised:<br>
>><br>
>> The method, getString("DATA_TYPE")<br>
>> of DatabaseMetaData.getProcedureColumns(),<br>
>> throws NumberFormatException from JDBC driver<br>
>> (getInt("DATA_TYPE") throws NullPointerException)<br>
>> if it's SQLServer's function that returns a table type.<br>
>><br>
>> Please use DBFlute-0.9.7.1-07-SNAPSHOT<br>
>> which is fixed about it.<br>
>> (if the Exception occurred, DBFlute ignores it)<br>
>> And also DBFlute.NET-0.8.9.17-07-SNAPSHOT<br>
>> is fixed about it.<br>
>><br>
>> By the way, I remembered how to call procedures through outside-SQL.<br>
>> If a procedure has no OUT parameter, you can call like this:<br>
>><br>
>><br>
>> <a href="https://www.seasar.org/svn/sandbox/dbflute/trunk/dbflute-sqlserver-example/src/main/resources/com/example/dbflute/sqlserver/dbflute/exbhv/various/vendorcheck/VendorCheckBhv_callProcReturnResultSetMore.sql" target="_blank">https://www.seasar.org/svn/sandbox/dbflute/trunk/dbflute-sqlserver-example/src/main/resources/com/example/dbflute/sqlserver/dbflute/exbhv/various/vendorcheck/VendorCheckBhv_callProcReturnResultSetMore.sql</a><br>
>> /= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =<br>
>> -- #df:entity#<br>
>><br>
>> -- !df:pmb!<br>
>> -- !!String memberStatusCode:cls(MemberStatus)!!<br>
>><br>
>> SP_RETURN_RESULT_SET_MORE @statusCode=/*$pmb.memberStatusCode*/'WDL'<br>
>> = = = = = = = = = =/<br>
>><br>
>><br>
>> <a href="https://www.seasar.org/svn/sandbox/dbflute/trunk/dbflute-sqlserver-example/src/main/resources/com/example/dbflute/sqlserver/dbflute/exbhv/various/vendorcheck/VendorCheckBhv_selectSimpleTableFunction.sql" target="_blank">https://www.seasar.org/svn/sandbox/dbflute/trunk/dbflute-sqlserver-example/src/main/resources/com/example/dbflute/sqlserver/dbflute/exbhv/various/vendorcheck/VendorCheckBhv_selectSimpleTableFunction.sql</a><br>
>> /= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =<br>
>> -- #df:entity#<br>
>><br>
>> -- !df:pmb!<br>
>> -- !!String memberStatusCode:cls(MemberStatus)!!<br>
>><br>
>> select * from FN_RETURN_TABLE(/*pmb.memberStatusCode*/'FML')<br>
>> = = = = = = = = = =/<br>
>><br>
>><br>
>> <a href="https://www.seasar.org/svn/sandbox/dbflute/trunk/dbflute-sqlserver-example/src/test/java/com/example/dbflute/sqlserver/dbflute/topic/ProcedureTest.java" target="_blank">https://www.seasar.org/svn/sandbox/dbflute/trunk/dbflute-sqlserver-example/src/test/java/com/example/dbflute/sqlserver/dbflute/topic/ProcedureTest.java</a><br>
>> /= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =<br>
>> String path =<br>
>> VendorCheckBhv.PATH_various_vendorcheck_callProcReturnResultSetMore;<br>
>> ProcReturnResultSetMorePmb pmb = new ProcReturnResultSetMorePmb();<br>
>> pmb.setMemberStatusCode_Formalized();<br>
>> Class<ProcReturnResultSetMore> entityType = ProcReturnResultSetMore.class;<br>
>><br>
>> ListResultBean<ProcReturnResultSetMore> memberList<br>
>> = vendorCheckBhv.outsideSql().selectList(path, pmb, entityType);<br>
>><br>
>> // If you don't use OUT parameter, you can call procedures like this.<br>
>> // But you cannot get second result set. (first result set only)<br>
>> = = = = = = = = = =/<br>
>> /= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =<br>
>> String path =<br>
>> VendorCheckBhv.PATH_various_vendorcheck_callProcReturnResultSetMore;<br>
>> SimpleTableFunctionPmb pmb = new SimpleTableFunctionPmb();<br>
>> pmb.setMemberStatusCode_Formalized();<br>
>> Class<SimpleTableFunction> entityType = SimpleTableFunction.class;<br>
>><br>
>> // ## Act ##<br>
>> ListResultBean<SimpleTableFunction> memberList =<br>
>> vendorCheckBhv.outsideSql().selectList(path, pmb, entityType);<br>
>> = = = = = = = = = =/<br>
>><br>
>> However I didn't confirm it in DBFlute.NET environment.<br>
>> (It works in DBFlute(Java) environment)<br>
>><br>
>><br>
>> Thanks,<br>
>> Kubo (jflute)<br>
>> _______________________________________________<br>
>> seasar-dotnet mailing list<br>
>> <a href="mailto:seasar-dotnet@ml.seasar.org">seasar-dotnet@ml.seasar.org</a><br>
>> <a href="https://ml.seasar.org/mailman/listinfo/seasar-dotnet" target="_blank">https://ml.seasar.org/mailman/listinfo/seasar-dotnet</a><br>
><br>
><br>
> _______________________________________________<br>
> seasar-dotnet mailing list<br>
> <a href="mailto:seasar-dotnet@ml.seasar.org">seasar-dotnet@ml.seasar.org</a><br>
> <a href="https://ml.seasar.org/mailman/listinfo/seasar-dotnet" target="_blank">https://ml.seasar.org/mailman/listinfo/seasar-dotnet</a><br>
><br>
><br>
_______________________________________________<br>
seasar-dotnet mailing list<br>
<a href="mailto:seasar-dotnet@ml.seasar.org">seasar-dotnet@ml.seasar.org</a><br>
<a href="https://ml.seasar.org/mailman/listinfo/seasar-dotnet" target="_blank">https://ml.seasar.org/mailman/listinfo/seasar-dotnet</a><br>
</div></div></blockquote></div><br>