0
我跟着這個articel store fast report template,實現它,但我不能保存和加載報告,因爲流是空的!在數據庫中保存fastreport模板
我跟着這個articel store fast report template,實現它,但我不能保存和加載報告,因爲流是空的!在數據庫中保存fastreport模板
最後我弄清楚了這個問題,它與SQLSERVER真正的可用空間有關,因爲我的FASTREPORT模板大小是字節[616054],因此它只保存sql中的50個字節,請檢查此鏈接varbinarymax , 於是,我改變了數據類型到NTEXT和轉換流串,用於存儲和執行相反的檢索機制
這個命令字節串
byte[] blob = stream.ToArray();
string st= System.Text.Encoding.UTF8.GetString(blob);
,這一次的檢索
byte blob2 =Encoding.UTF8.GetBytes(this.TableAdapter.GetDataByID(key).Rows[0]["Report"].ToString());
也可以試試這個用VARBINARY(最大)檢查出來: Enable File Stream in SQL