Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Bugs & Issues> Firebird embedded "Specified cast is not valid"
 

Pages: 1
Bugs & Issues
Firebird embedded "Specified cast is not valid"
Page:1/1 

  Print all messages in this thread  
Poster Message
sherman
User



Location:
Malaga - Spain
Joined on:
31-Jul-2007 18:58:13
Posted:
9 posts
# Posted on: 21-Jul-2009 17:51:50.  
Hi!, when I try to run my app with Firebird Embedded I receive: "Specified cast is not valid."
Everything it's ok with Firebird Client/server.

The problem is with Decimal fields (NUMERIC(15,0) in the database)

Code:

CuentaEntity cuenta = new CuentaEntity(id);
adapter.FetchEntity(cuenta);
MessageBox.Show(cuenta.Numero.ToString()); // ok, string field with the correct value
MessageBox.Show(cuenta.Icono.ToString()); // ok, int field with the correct value
MessageBox.Show(cuenta.IdCuenta.ToString()); // decimal field (PK) -> exception "Specified cast is not valid."


Can you help me?

Code:

System.InvalidCastException was unhandled
Message="Specified cast is not valid."
Source="Microserver.Integrador.DAL"
StackTrace:
     at Microserver.Integrador.DAL.EntityClasses.CuentaEntity.get_IdBanco() in P:\UnicajaIntegradorCuentas\Fuentes\Integrador\Microserver.Integrador.DAL\EntityClasses\CuentaEntity.cs:line 1023
     at Microserver.Integrador.GUI.Helpers.CuentaHelper.TooltipCuenta(Decimal idCuenta) in P:\UnicajaIntegradorCuentas\Fuentes\Integrador\Integrador\Helpers\CuentaHelper.cs:line 29
     at Microserver.Integrador.GUI.MainMenuForm.RefrescarTagCloud() in P:\UnicajaIntegradorCuentas\Fuentes\Integrador\Integrador\MainMenuForm.cs:line 51
     at Microserver.Integrador.GUI.MainMenuForm..ctor() in P:\UnicajaIntegradorCuentas\Fuentes\Integrador\Integrador\MainMenuForm.cs:line 33
     at Microserver.Integrador.GUI.Program.Main() in P:\UnicajaIntegradorCuentas\Fuentes\Integrador\Integrador\Program.cs:line 29
     at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
     at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
     at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
     at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
     at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
     at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
     at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
     at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
     at System.Threading.ThreadHelper.ThreadStart()
InnerException:


Environment:
LLBLGen 2.6 - September 12th, 2008
C# - Adapter - .NET 2.0
Firebird 2.1
  Top
MTrinder
User



Location:
London by day, Milton Keynes by night.
Joined on:
08-Oct-2008 17:55:47
Posted:
1461 posts
# Posted on: 21-Jul-2009 21:44:39.  
This thread deals with a similar issue.

Matt


  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37967 posts
# Posted on: 21-Jul-2009 22:15:06.  
The ado.net provider returned it as a different type for embedded it seems. Do you use the latest firebird embedded dll? What type is it returned as? Also, please notify the firebird provider people about this, as it might be a bug on their side (as in: the type should be returned as the same .net type as with normal firebird.)
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.