-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: The Date should be between certain dates error
PostPosted: Sun May 29, 2005 3:57 pm 
I am writing this code And it keeps throwing the error that SqlDate should be between (SomeDate) and (SomeDate). whats happenning ??

Configuration cfg = new Configuration();
cfg.AddAssembly("WebApplication1");
ISessionFactory factory = cfg.BuildSessionFactory();
ISession session = factory.OpenSession();
ITransaction transaction = session.BeginTransaction();

IList personList = session.CreateCriteria(typeof(Person)).List();

foreach(Person person in personList)
{
if(person.Name.Equals("Azam"))
{
DateTime time = DateTime.Now;
person.DateStarted = DateTime.Now;
session.Save(person);
transaction.Commit();
break;
}
else
{ Response.Write("Azam is not in the list"); }
}


Top
  
 
 Post subject:
PostPosted: Mon May 30, 2005 11:45 am 
Expert
Expert

Joined: Fri May 13, 2005 5:56 pm
Posts: 308
Location: Santa Barbara, California, USA
could be any number of things. can you post the specific error from the log4net log? also, might be good to include the INSERT statement being generated by NH.

-devon


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.