Date format is 'YYYY-MM-DD'
e.g.
select * from orders where Date='2008-04-22'
HQL (as literal)
from Activity a where a.Date between '2008-01-01' and '2008-02-29'
This blog is a record of some development issues I have faced. There may be something of use!
Date format is 'YYYY-MM-DD'
e.g.
select * from orders where Date='2008-04-22'
from Activity a where a.Date between '2008-01-01' and '2008-02-29'
Had apparently strange goings on with IIS & Asp.Net.
Delivered new mylibrary.dll. User renamed mylibrary.dll to "old mylibrary.dll", copied in new mylibrary.dll. Got error saying 'old mylibrary.dll' could not be loaded into manifest.
After deleting the 'old mylibrary.dll' files the web site loaded ok.
After a discussion we came to the conclusion that IIS loads all the DLL files in the BIN directory irrespective of references within Web.Config.
The site then throws exception when two dlls contain the same Assembly-name - this also makes sense.
So what appeared to be strange behaviour came down to not thinking logically!
There is a bug with the AJAX calendar extender in that the style of the popup calendar are not applied if the text-box /calendar extender are hidden when a page first loads.
e.g. Panel with Details on is only shown once valid record found; if the first calendar extender on the page is within this hidden Details panel the calendar will not be displayed correctly when Details does become visible:
To fix this have a hidden calendar extender at top of the page:
<!-- Workaround for Calendar not displaying correctly - if hidden when page first loads -->
<div style="display: none"><asp:TextBox runat="server" ID="textbox1" /><cc1:CalendarExtender ID="ceTextBox1" runat="server" TargetControlID="textbox1" /></div>
Calendar is then displayed correctly:
Run CRRedist2005_x86.msi (taken from C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\CrystalReports\)
Copy C:\Inetpub\wwwroot\aspnet_client to root of website)
Report (design-time) connection was SQL-Native changed to be SQLOLEDB.
CrystalDecisions.Shared.TableLogOnInfo tliCurrent;
foreach (CrystalDecisions.CrystalReports.Engine.Table tbCurrent in crSource.ReportDocument.Database.Tables)
{
tliCurrent = tbCurrent.LogOnInfo;
tliCurrent.ConnectionInfo.ServerName = server;
tliCurrent.ConnectionInfo.UserID = username;
tliCurrent.ConnectionInfo.Password = password;
tliCurrent.ConnectionInfo.DatabaseName = dbname;
tbCurrent.ApplyLogOnInfo(tliCurrent);
}
The toolbar options were not working because a post-back was being generated that performs the functionality - the assigning of the report was within a !IsPostBack block. As the report is not held in state it must be reloaded during post back.
Was testing catching NHibernate.StaleObjectStateException (exception where one user updates a record which another user then attempts to update without getting newer version).
Was getting 'Failed to initialise lazy..." when reloading record on associated collection due to a timeout and also appeared to be locking the server (no queries could be run on tables involved in failed update)
It came down to the transaction not being Rolled-back when exception thrown - so obviously DB still in transaction.