2015-04-07 52 views
0

我們正在嘗試在我們的PHP Web基礎應用程序上運行iReport。我們使用Ubuntu Server與php5並使用laravel框架和JasperStarter和SQL Server錯誤找不到準備好的句柄

我們正在運行SQL Server 2012數據庫。

輸入後該

jasperstarter myReport.jasper 
-f pdf 
-P parameter1=test 
-t generic 
-H <my databse server ip> 
-u <username> 
-p <password> 
-n <dbname> 
--db-driver com.microsoft.sqlserver.jdbc.SQLServerDriver 
--db-url jdbc:sqlserver://<my databse server ip>:1433 

我們得到一個空的PDF和

我們收到此錯誤,當我運行SQL事件探查:

的SQL:

declare @p1 int 
set @p1=1 
exec sp_prepexec @p1 output,NULL,N'select top 10 * from mytable' 
select @p1 
exec sp_unprepare 1 

的錯誤:

Msg 8179, Level 16, State 6, Procedure sp_prepexec, Line 1 
Could not find prepared statement with handle 1. 
+0

什麼是'jasperstarter'? –

+0

到@AlexK:我使用https://github.com/cossou/JasperPHP爲我的pakage,這是jasperstarter http://jasperstarter.sourceforge.net/ – starplateena

回答

0

經過幾天的苦難,現在我已經解決了這個問題。

我不知道如果我做錯了,當我添加sqljdbc驅動程序。

我將驅動程序更改爲jtds jdbc驅動程序,它的工作方式就像魅力一樣。

Tq