Data conversion failed. [ OLE DB status value (if known) = 2 ]

Nov 2, 2011 at 1:31 AM
Edited Nov 2, 2011 at 1:35 AM

Hi,

I'm trying to use Facebook Connect Widget, but getting the following error message (after FB login popup show up): 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlServerCe.SqlCeException: Data conversion failed. [ OLE DB status value (if known) = 2 ]

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[SqlCeException (0x80004005): Data conversion failed. [ OLE DB status value (if known) = 2 ]]
   System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr) +50
   System.Data.SqlServerCe.SqlCeCommand.ExecuteCommandText(IntPtr& pCursor, Boolean& isBaseTableCursor) +341
   System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options) +660
   System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQuery() +21
   NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(IDbCommand cmd) +290
   NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IExpectation expectation) +16
   NHibernate.Persister.Entity.AbstractEntityPersister.Update(Object id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor session) +965

[GenericADOException: could not update: [Piedone.Facebook.Suite.Models.FacebookUserPartRecord#20][SQL: UPDATE Piedone_Facebook_Suite_FacebookUserPartRecord SET FacebookUserId = ?, Name = ?, FirstName = ?, LastName = ?, Link = ?, FacebookUserName = ?, Gender = ?, TimeZone = ?, Locale = ?, IsVerified = ? WHERE Id = ?]]
   NHibernate.Persister.Entity.AbstractEntityPersister.Update(Object id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor session) +1157
   NHibernate.Persister.Entity.AbstractEntityPersister.UpdateOrInsert(Object id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor session) +195
   NHibernate.Persister.Entity.AbstractEntityPersister.Update(Object id, Object[] fields, Int32[] dirtyFields, Boolean hasDirtyCollection, Object[] oldFields, Object oldVersion, Object obj, Object rowId, ISessionImplementor session) +354
   NHibernate.Action.EntityUpdateAction.Execute() +400
   NHibernate.Engine.ActionQueue.Execute(IExecutable executable) +107
   NHibernate.Engine.ActionQueue.ExecuteActions(IList list) +86
   NHibernate.Engine.ActionQueue.ExecuteActions() +25
   NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session) +160
   NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event) +56
   NHibernate.Impl.SessionImpl.Flush() +298
   NHibernate.Transaction.DistributedTransactionContext.System.Transactions.IEnlistmentNotification.Prepare(PreparingEnlistment preparingEnlistment) +429

[TransactionAbortedException: The transaction has aborted.]
   System.Transactions.TransactionStateAborted.EndCommit(InternalTransaction tx) +11
   System.Transactions.CommittableTransaction.Commit() +233
   System.Transactions.TransactionScope.InternalDispose() +396
   System.Transactions.TransactionScope.Dispose() +1449
   Orchard.Data.TransactionManager.System.IDisposable.Dispose() in d:\Builds\OrchardFull\src\Orchard\Data\TransactionManager.cs:47
   Autofac.Core.Disposer.Dispose(Boolean disposing) +74
   Autofac.Util.Disposable.Dispose() +46
   Autofac.Core.Lifetime.LifetimeScope.Dispose(Boolean disposing) +21
   Autofac.Util.Disposable.Dispose() +46
   Orchard.Environment.<>c__DisplayClass2.<.ctor>b__0() in d:\Builds\OrchardFull\src\Orchard\Environment\WorkContextAccessor.cs:75
   Orchard.Environment.HttpContextScopeImplementation.System.IDisposable.Dispose() in d:\Builds\OrchardFull\src\Orchard\Environment\WorkContextAccessor.cs:80
   Orchard.Mvc.Routes.HttpAsyncHandler.EndProcessRequest(IAsyncResult result) in d:\Builds\OrchardFull\src\Orchard\Mvc\Routes\ShellRoute.cs:151
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +10303829
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +178


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17020

Coordinator
Nov 2, 2011 at 10:20 AM

Thanks for the bugreport, this is a serious issue. I'm currently investigating this.

Coordinator
Nov 2, 2011 at 11:04 AM

Thanks again, this was a serious bug from the initial release on, I don't know how this went unnoticed till today.

Please update to the latest release.

Nov 2, 2011 at 12:13 PM

Thanks for the quick response. Now it works.

And another small question - shouldn't FB login popup close after a successful login?

Coordinator
Nov 2, 2011 at 6:22 PM

Cool!

It should. I guess it doesn't? Are there any javascript errors?

Nov 8, 2011 at 11:20 PM

It only happens when using Internet Explorer 10 Developer Preview. In Opera everything works fine.

Sorry ;-)

Coordinator
Nov 9, 2011 at 1:03 PM

I tried it in IE 9 64b and it works fine. Although I'm not surprised if something doesn't work in IE that should and works in every other browser, let's wait for the release version :-). If this is an issue with my module, it would be for everyone, since this is Facebook's responsibility.