Hey guys and girls..
I've been using Cuyahoga and open source CMS which heavily makes use of nhibnerate.
Everything is great but I recently tried writing a Windows application rather than a web application using my current libraries and have his a strange problem.
The SQL being generated by Nibernate seems to be getting screwed when it comes to date time variables
Here is an example of the ADO Exception SQL statement...
Code:
exec sp_executesql N'INSERT INTO THINK_user (updatetimestamp, username, password, firstname, lastname, company, email, website, timezone, isactive, lastlogin, lastip,
inserttimestamp) VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11, @p12); select SCOPE_IDENTITY()',N'@p0 datetime,@p1 nvarchar(4000),@p2
nvarchar(4000),@p3 nvarchar(4000),@p4 nvarchar(4000),@p5 nvarchar(4000),@p6 nvarchar(18),@p7 nvarchar(4000),@p8 int,@p9 bit,@p10 datetime,@p11 nvarchar(4000),@p12
datetime',@p0=''2007-11-02 17:41:57:460'',@p1=NULL,@p2=NULL,@p3=NULL,@p4=NULL,@p5=NULL,@p6=N'vijay@ukwalasm.com',@p7=NULL,@p8=0,@p9=1,@p10=NULL,@p11=NULL,@p12=''2007-11-02 17:41:52:000''
As you can see it is putting double quotes around the date time fields which is causing the stored proc to fail
Any ideas as this is for a major deadline so any help would be appreciated