Strange Issue for every action

Posts   
 
    
gabrielk avatar
gabrielk
User
Posts: 231
Joined: 01-Feb-2005
# Posted on: 11-Dec-2006 10:20:58   

Hi all,

I've no clue why my code won't open any entities anymore.

Query in the exception works in Access, but just won't load.

Any pointers would be greatly apperciated.

Regards, Gab

Exception:

SD.LLBLGen.Pro.ORMSupportClasses.ORMQueryExecutionException was unhandled
  Message="An exception was caught during the execution of a retrieval query: Waarden voor een of meer vereiste parameters ontbreken.. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception."
  Source="SD.LLBLGen.Pro.ORMSupportClasses.NET20"
  RuntimeBuild="09282006"
  RuntimeVersion="2.0.0.0"
  QueryExecuted="\r\n\tQuery: SELECT [Employee].[EmployeeId], [Employee].[FullName], [Employee].[Initialen], [Employee].[JobTitle], [Employee].[Telephone], [Employee].[City], [Employee].[GroupId], [Employee].[LastUpdate] FROM [Employee] WHERE ( [Employee].[GroupId] = @GroupId1)\r\n\tParameter: @GroupId1 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 2.\r\n"
  StackTrace:
       at SD.LLBLGen.Pro.ORMSupportClasses.RetrievalQuery.Execute(CommandBehavior behavior)
       at SD.LLBLGen.Pro.ORMSupportClasses.DaoBase.ExecuteMultiRowRetrievalQuery(IRetrievalQuery queryToExecute, ITransaction containingTransaction, IEntityCollection collectionToFill, Boolean allowDuplicates, IEntityFields fieldsUsedForQuery)
       at SD.LLBLGen.Pro.ORMSupportClasses.DaoBase.PerformGetMultiAction(ITransaction containingTransaction, IEntityCollection collectionToFill, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPredicate selectFilter, IRelationCollection relations, Int32 pageNumber, Int32 pageSize)
       at SD.LLBLGen.Pro.ORMSupportClasses.DaoBase.GetMulti(ITransaction containingTransaction, IEntityCollection collectionToFill, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IPredicate selectFilter, IRelationCollection relations, Int32 pageNumber, Int32 pageSize)
       at SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase`1.GetMulti(IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relations, Int32 pageNumber, Int32 pageSize)
       at SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase`1.GetMulti(IPredicate selectFilter)
       at Amteam.BriefpapierGenerator.GroupForm.LoadData() in D:\Mijn Documenten\Anton van Baalen\Briefpapier generator\Briefpapier generator\GroupForm.cs:line 44
       at Amteam.BriefpapierGenerator.GroupForm..ctor(Int32 GroupId) in D:\Mijn Documenten\Anton van Baalen\Briefpapier generator\Briefpapier generator\GroupForm.cs:line 22
       at Amteam.BriefpapierGenerator.Form1.btEditGroup_Click(Object sender, EventArgs e) in D:\Mijn Documenten\Anton van Baalen\Briefpapier generator\Briefpapier generator\Form1.cs:line 298
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods. IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at Amteam.BriefpapierGenerator.Program.Main() in d:\Mijn Documenten\Anton van Baalen\Briefpapier generator\Briefpapier generator\Program.cs:line 17
       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 11-Dec-2006 10:54:04   

As you can see, the parameter is there... (the tracer logs the parameters from the parameter collection of the command object.)

Did you install office 2007 or something else? (it works here with 2007 installed)

Frans Bouma | Lead developer LLBLGen Pro
gabrielk avatar
gabrielk
User
Posts: 231
Joined: 01-Feb-2005
# Posted on: 11-Dec-2006 10:59:00   

I have office 2003 SP2.

LLBL Uses: Access DBDriver (2.0.07012006)

The only thing I changed today is to add a column, LastUpdate. I am 100% sure the file which the application opens has this column (which should have given another error anyway if it was that problem).

Any suggestions on how I can investigate this?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 11-Dec-2006 11:13:43   

The sad thing about the toy database called 'Access' is that a missing column is seen as a parameter. So if you added a field to a table, please check the connection string in the config file if it points to the .mdb file you changed the table in.

Frans Bouma | Lead developer LLBLGen Pro
gabrielk avatar
gabrielk
User
Posts: 231
Joined: 01-Feb-2005
# Posted on: 11-Dec-2006 12:08:16   

Ok, make it 100% minus 1% sure...

Path was almost identical rage

My fault, thanks for the hint.