Hello Kubo さん、<br><br>Good Afternoon....<br><br>I tried with dbflute-0.9.7.1-08-SNAPSHOT.Now it is assigning 2010-03-31 12:34:56.0 for date format.<br><br>I think in Sqlserver the date format is different from datetime format.So its giving following exception.<br>
<br>2010-06-12 12:07:41,937 [main] INFO (DfProcedureExecutionMetaExtractor#doExtractExecutionMetaData():109) - ...Calling: {? = call PMS_DRP_MaintainDeliveryData_Tran_SP(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}<br>2010-06-12 12:07:41,953 [main] INFO (DfProcedureExecutionMetaExtractor#doExtractExecutionMetaData():132) - (x) retry: ? = call PMS_DRP_MaintainDeliveryData_Tran_SP(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)<br>
2010-06-12 12:07:41,953 [main] INFO (DfProcedureExecutionMetaExtractor#doExtractExecutionMetaData():186) - *Failed to execute the procedure for getting meta data:<br> {? = call PMS_DRP_MaintainDeliveryData_Tran_SP(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}<br>
@RETURN_VALUE: int(10) as Return<br> @User_Id: varchar(10) as In<br> @Customer_Code: varchar(6) as In<br> @Delivery_Port_No: varchar(3) as In<br> @Part_Code: varchar(34) as In<br> @Delivery_Truck_No: varchar(6) as In<br>
@Delivery_Date: date(10) as In<br> @Delivery_Time: varchar(20) as In<br> @Departure_Time: varchar(20) as In<br> @Port_Close_Time: varchar(20) as In<br> @Port_Open_DateTime: varchar(20) as In<br> @modeflag: char(1) as In<br>
@sid: int(10) as In<br> test values = [0, 0, 0, 0, 0, 2010-03-31 12:34:56.0, 0, 0, 0, 0, 0, 0]<br> Conversion failed when converting date and/or time from character string.<br><br>Thanks,<br>Thomas<br><br><br><div class="gmail_quote">
On Fri, Jun 11, 2010 at 6:30 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 evening, thomas<br>
<br>
Thank you for your showing me log messages.<br>
I see, you use SQLServer 2008.<br>
The type "date" is new data type from 2008.<br>
<br>
Please try DBFlute-0.9.7.1-08-SNAPSHOT<br>
<div class="im">which is fixed about it.<br>
</div><a href="http://dbflute.sandbox.seasar.org/ja/environment/newest.html" target="_blank">http://dbflute.sandbox.seasar.org/ja/environment/newest.html</a><br>
<br>
However, my environment is SQLServer 2005.<br>
So I cannot test it. (cannot use "date" type)<br>
Please try it and then after tell me its result.<br>
<br>
Thanks<br>
<font color="#888888">Kubo (jflute)<br>
</font><div><div></div><div class="h5"><br>
<br>
2010/6/11 thomas <<a href="mailto:jp.mcy.10@gmail.com">jp.mcy.10@gmail.com</a>>:<br>
> Hello Kubo さん、<br>
><br>
> In the following link its mentioned that the test values for date type is<br>
> passed as<br>
> '2010-03-31 12:34:56'<br>
><br>
> <a href="http://dbflute.sandbox.seasar.org/ja/manual/function/generator/task/sql2entity/procedurepmb.html#resultsethandling" target="_blank">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<br>
> "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<br>
> (DfProcedureExecutionMetaExtractor#doExtractExecutionMetaData():100) -<br>
> ...Calling: {? = call PMS_COM_MONTH_CLOSE_CHECK_FN(?, ?, ?)}<br>
> 2010-06-11 14:56:41,578 [main] INFO<br>
> (DfProcedureExecutionMetaExtractor#doExtractExecutionMetaData():123) - (x)<br>
> retry: ? = call PMS_COM_MONTH_CLOSE_CHECK_FN(?, ?, ?)<br>
> 2010-06-11 14:56:41,578 [main] INFO<br>
> (DfProcedureExecutionMetaExtractor#doExtractExecutionMetaData():177) -<br>
> *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>
> @Date: date(10) as In<br>
> @Fiscal_year: int(10) as In<br>
> @Fiscal_month: int(10) as In<br>
> test values = [0, 0, 0]<br>
> Error converting data type nvarchar to date.<br>
><br>
><br>
><br>
><br>
> On Fri, Jun 11, 2010 at 2:40 PM, kubo <<a href="mailto:dbflute@gmail.com">dbflute@gmail.com</a>> wrote:<br>
>><br>
>> Good afternoon, thomas<br>
>><br>
>> Success:<br>
>><br>
>> DBFLUTE_CLIENT: {dfclient}<br>
>> database = mssql (Microsoft SQL Server 10.00.1600)<br>
>><br>
>> 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>
>> > Hello Kubo さん、<br>
>> ><br>
>> > I downloaded the DBFlute-0.9.7.1-07-SNAPSHOT and i tried,its not<br>
>> > 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>
>> >><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>
>> >><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>
>> >><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 =<br>
>> >> 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>
><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>