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: SQL: Column VALIDAS not found.
PostPosted: Tue Jun 10, 2008 10:00 am 
Beginner
Beginner

Joined: Tue Jan 22, 2008 11:33 am
Posts: 46
Hi I connect to a FoxPro Db via OleDb. For some reason I get an error

Quote:
InnerException: {"SQL: Column 'VALIDAS' is not found."}
System.Exception {System.Data.OleDb.OleDbException}


Code:
[NHibernate.ADOException]   {"could not initialize a collection: [xxx.MasterData.User.Data.OrganizationalUnit.FkAssignUnitToStatusOrganizationalUnit#10][SQL: SELECT fkassignun0_.OrganizationalUnitId as Organiza5___1_, fkassignun0_.AssignId as AssignId1_, fkassignun0_.AssignId as AssignId6_0_, fkassignun0_.ValidFrom as ValidFrom6_0_, fkassignun0_.ValidTo as ValidTo6_0_, fkassignun0_.StatusId as StatusId6_0_, fkassignun0_.OrganizationalUnitId as Organiza5_6_0_ FROM AssignUnitToStatus fkassignun0_ WHERE fkassignun0_.OrganizationalUnitId=?]"}   NHibernate.ADOException


Code:
SqlString:
{SELECT fkassignun0_.OrganizationalUnitId as Organiza5___1_, fkassignun0_.AssignId as AssignId1_, fkassignun0_.AssignId as AssignId6_0_, fkassignun0_.ValidFrom as ValidFrom6_0_, fkassignun0_.ValidTo as ValidTo6_0_, fkassignun0_.StatusId as StatusId6_0_, fkassignun0_.OrganizationalUnitId as Organiza5_6_0_ FROM AssignUnitToStatus fkassignun0_ WHERE fkassignun0_.OrganizationalUnitId=?}   NHibernate.SqlCommand.SqlString


Code:
xxx.BaseData.DataAccessException wurde nicht behandelt.
  Message="Error getting items"
  Source="xxx.BaseData"
  StackTrace:
       bei xxx.BaseData.BusinessObjectFactory`1.get_GetItems() in C:\Dokumente und Einstellungen\All Users\Dokumente\Visual Studio 2005\Projects\xxx\BaseData\BusinessObjectFactory.cs:Zeile 71.
       bei xxx.MasterData.User.DataDAO.OrganizationalUnitDAO.get_ListViewData() in C:\Dokumente und Einstellungen\All Users\Dokumente\Visual Studio 2005\Projects\xxx\MasterData\User\DataDAO\OrganizationalUnitDAO.cs:Zeile 35.
       bei xxx.MasterData.User.Explorer.frmExplorer.SetUpDataBinding() in C:\Dokumente und Einstellungen\All Users\Dokumente\Visual Studio 2005\Projects\xxx\MasterData\User\Explorer\Explorer.cs:Zeile 92.
       bei xxx.MasterData.User.Explorer.frmExplorer..ctor() in C:\Dokumente und Einstellungen\All Users\Dokumente\Visual Studio 2005\Projects\xxx\MasterData\User\Explorer\Explorer.cs:Zeile 42.
       bei xxx.MasterData.User.Explorer.Program.Main() in C:\Dokumente und Einstellungen\All Users\Dokumente\Visual Studio 2005\Projects\xxx\MasterData\User\Explorer\Program.cs:Zeile 23.
       bei System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       bei System.Threading.ThreadHelper.ThreadStart()


However I do not understand how to approach. Their is no column "validas", neither in the classes and mapping files nor in my database.

Any idea How I could possibly find the solution? It seems to come from FoxPro, but I have no clue how to trace this...?

Thanks in advance
antoschka


Top
 Profile  
 
 Post subject: Found it, but cannot resolve the problem myself
PostPosted: Tue Jun 10, 2008 6:37 pm 
Beginner
Beginner

Joined: Tue Jan 22, 2008 11:33 am
Posts: 46
Hi,

I found the problem. I switched on the show_sql to find out what SQL Commands are generated. In my case I get the following output

Code:
NHibernate: SELECT this_.OrganizationalUnitId as Organiza1_9_0_, this_.TypeId as TypeId9_0_ from OrganizationalUnit this_
NHibernate: SELECT type0_.TypeId as TypeId16_0_, type0_.TypeName as TypeName16_0_, type0_.Icon as Icon16_0_, type0_.IsStructuralType as IsStruct4_16_0_, type0_.IsVisible as IsVisible16_0_, type0_.CanBeRootInHierarchy as CanBeRoo6_16_0_, type0_.IsEditable as IsEditable16_0_, type0_.SuperTypeId as SuperTyp8_16_0_ from Type type0_ WHERE type0_.TypeId=?; @p0 = 'employee                                          '
NHibernate: SELECT type0_.TypeId as TypeId16_0_, type0_.TypeName as TypeName16_0_, type0_.Icon as Icon16_0_, type0_.IsStructuralType as IsStruct4_16_0_, type0_.IsVisible as IsVisible16_0_, type0_.CanBeRootInHierarchy as CanBeRoo6_16_0_, type0_.IsEditable as IsEditable16_0_, type0_.SuperTypeId as SuperTyp8_16_0_ from Type type0_ WHERE type0_.TypeId=?; @p0 = 'group                                             '
NHibernate: SELECT type0_.TypeId as TypeId16_0_, type0_.TypeName as TypeName16_0_, type0_.Icon as Icon16_0_, type0_.IsStructuralType as IsStruct4_16_0_, type0_.IsVisible as IsVisible16_0_, type0_.CanBeRootInHierarchy as CanBeRoo6_16_0_, type0_.IsEditable as IsEditable16_0_, type0_.SuperTypeId as SuperTyp8_16_0_ from Type type0_ WHERE type0_.TypeId=?; @p0 = 'structuralUnit                                    '
NHibernate: SELECT type0_.TypeId as TypeId16_0_, type0_.TypeName as TypeName16_0_, type0_.Icon as Icon16_0_, type0_.IsStructuralType as IsStruct4_16_0_, type0_.IsVisible as IsVisible16_0_, type0_.CanBeRootInHierarchy as CanBeRoo6_16_0_, type0_.IsEditable as IsEditable16_0_, type0_.SuperTypeId as SuperTyp8_16_0_ from Type type0_ WHERE type0_.TypeId=?; @p0 = 'role                                              '
NHibernate: SELECT fkassignun0_.OrganizationalUnitId as Organiza5___1_, fkassignun0_.AssignId as AssignId1_, fkassignun0_.AssignId as AssignId6_0_, fkassignun0_.Validas ValidFrom6_0_, fkassignun0_.ValidTo as ValidTo6_0_, fkassignun0_.StatusId as StatusId6_0_, fkassignun0_.OrganizationalUnitId as Organiza5_6_0_ FROM AssignUnitToStatus fkassignun0_ WHERE fkassignun0_.OrganizationalUnitId=?; @p0 = '10'


In the last section you find "fkassignun0_.Validas" instead of "fkassignun0_.ValidFrom as". Obviously the string conversion of the assembly is buggy. unfortunately I have no idea how to fix it. Maybe there is somebody how knows how to do that??? Do you agree with my assumption that the bug is caused by Nhibernate.JetDriver assembly?

Thank you in advance for your help, effort and feedback

antoschka


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.