On Jun 5, 12:31 pm, Jonathan Pryor <[email protected]> wrote:
> On Thu, 2009-06-04 at 21:25 -0700, [email protected] wrote:
>
> Yes, and I'm surprised that updates are causing issues.
>
Hi Jon,
I forgot to mention I was using the method below to do my updates.
Which is why I suspect is why I was getting the unexpeected result. I
am using this approach as it's the only way I have found to get around
the DbLinq caching.
public void ExecuteDynamicUpdate(object entity) {
using (DatabaseContext.OpenConnection()) //ConnMgr will
close connection for us
using (IDatabaseTransaction transaction =
DatabaseContext.Transaction()) {
var queryContext = new QueryContext(this);
var updateQuery = QueryBuilder.GetUpdateQuery(entity,
null, queryContext);
QueryRunner.Update(entity, updateQuery, null);
transaction.Commit();
}
}
With the latest changes you've put into svn the date queries are now
working properly for me although I had to add quotes around the field
as per below. I'm not sure if that's the appropriate place to that or
not but at the very least it has worked for all my select and updates
so far.
public virtual SqlStatement GetLiteral(DateTime literal)
{
return "'" + literal.ToString("o") + "'";
}
Thanks,
Aaron
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---