904 error

Posts   
 
    
MikeM
User
Posts: 7
Joined: 08-Dec-2004
# Posted on: 31-Dec-2004 13:27:00   

Hi,

Once again I'm having a problem doing the simplest thing with this software.

I'm trying to bring back a set of records from a table:


        Dim fyscol As New FGFM.CollectionClasses.FYSICALCollection
    
fyscol.GetMulti(Nothing)

        With DataGridFys
            .DataSource = fyscol
            .DataBind()
        End With



Fysical table

ID                                               NUMBER
LOCATION                                           VARCHAR2(50)
DDFKIND                                         VARCHAR2(50)
DDFDETAIL                                         VARCHAR2(50)
INTERFACE_                                       VARCHAR2(10)
EQUIPMENTNAME                                     VARCHAR2(100)
SHELFNAME                                         VARCHAR2(50)
CARDPORT                                           VARCHAR2(50)
CARD                                               VARCHAR2(50)
PORT                                               VARCHAR2(50)
CIRCUITID                                         NUMBER
[b]SEQNR                                              NUMBER[/b]
RESERVEDBY                                       VARCHAR2(50)
RESERVEDDATE                                       DATE
RESERVEDNR                                       VARCHAR2(50)
DDFNAME                                         VARCHAR2(50)
INTERFACECARDPORT                                 VARCHAR2(50)
PROJSTATUS                                       NUMBER
PROJNR                                           VARCHAR2(50)
SLOTNR                                           NUMBER
LASTRECONSILED                                   DATE
COUNTRYID                                         VARCHAR2(50)
IPADRES                                         VARCHAR2(50)
CONNECTEDTO                                     NUMBER
PORTSTATUS                                       VARCHAR2(6)
PROTOCOL                                           VARCHAR2(50)
SUBNET                                           VARCHAR2(50)
RC                                               VARCHAR2(50)
IMSCONNECTEDDBASE                                 VARCHAR2(20)
FYSICALIDCONNECTEDDBASE                         NUMBER

I get this error on the fyscol.GetMulti

 ORA-00904: "FYSICAL"."SEQNR": invalid identifier 
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: Oracle.DataAccess.Client.OracleException: ORA-00904: "FYSICAL"."SEQNR": invalid identifier

Source Error: 


Line 71: 
Line 72:            MyBase.WireTransaction(selectQuery, transactionToUse)
Line 73:            Return MyBase.ExecuteMultiRowDataTableRetrievalQuery(selectQuery, DbUtils.CreateDataAdapter(), tableToFill)
Line 74:        End Function
Line 75:        


Source File: C:\FGFM\DaoClasses\TypedListDAO.vb Line: 73 

Stack Trace: 


[OracleException: ORA-00904: "FYSICAL"."SEQNR": invalid identifier]
   Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure)
   Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src)
   Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)
   Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataTable dataTable, IDbCommand command, CommandBehavior behavior)
   System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
   SD.LLBLGen.Pro.ORMSupportClasses.DaoBase.ExecuteMultiRowDataTableRetrievalQuery(IRetrievalQuery queryToExecute, DbDataAdapter dataAdapterToUse, DataTable tableToFill)
   FGFM.DaoClasses.TypedListDAO.GetMultiAsDataTable(IEntityFields fieldsToReturn, DataTable tableToFill, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPredicate selectFilter, IRelationCollection relations, Boolean allowDuplicates, IGroupByCollection groupByClause, ITransaction transactionToUse, Int32 pageNumber, Int32 pageSize) in C:\FGFM\DaoClasses\TypedListDAO.vb:73
   GFM.Task_new_work.ReadData() in C:\GFM\gfm\Task_new_work.aspx.vb:336
   GFM.Task_new_work.OrderBut_Click(Object sender, EventArgs e) in C:\GFM\gfm\Task_new_work.aspx.vb:426
   System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   System.Web.UI.Page.ProcessRequestMain()




This stuff is driving to me an early grave.

Mike

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 31-Dec-2004 14:18:32   

You quote your code, a GetMulti() call, but that's not the code which causes the exception. Your exception originates at: C:\GFM\gfm\Task_new_work.aspx.vb, line:336

Please, quote that code and if you specify a filter, also the filter construction code.

Oh and don't panic, we're here to help.

(ps: I know the code you pasted isn't the code which causes teh exception because the exception is caused somewhere in the typedlistDAO, so you're fetching a typed list, not an entity collection. It therefore can be you pass a filter to the wrong typed list's Fill call, or you constructed the wrong filter. All in all, hte code you pasted, the GetMulti() is not the code that causes this exception. )

Frans Bouma | Lead developer LLBLGen Pro
MikeM
User
Posts: 7
Joined: 08-Dec-2004
# Posted on: 31-Dec-2004 14:38:25   

Thanks, you were right I was using the same sorter expression for two different entities.

But the real problem is that I'm losing a bit of confidence in the methods of extracting data from the database. I'm now starting to write my own stored procedures because they are much quicker and easier to write than using the LLBGEN code. I feel more in control of the code than using the generated code. As for the problem the other day with the datagrid, I was trying to do something which was beyond it's capabilities. I find ASP and .NET promise a lot but when you get down to the detail it's restricted.

I'll plough on!

Have a happy New Year

Mike

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 31-Dec-2004 14:53:58   

MikeM wrote:

Thanks, you were right I was using the same sorter expression for two different entities.

That's ok, these are the things people who are new to the application run into once or twice and then they know what to do to avoid issues like this. It happens with all the frameworks you and I use: often API's are complex (and the more functionality an API exposes, the more complex it gets) and to know how to avoid every mistake costs some time. I make mistakes in .NET every day, and I don't consider myself a newbie wink

But the real problem is that I'm losing a bit of confidence in the methods of extracting data from the database. I'm now starting to write my own stored procedures because they are much quicker and easier to write than using the LLBGEN code. I feel more in control of the code than using the generated code.

It's the initial startup of things. It also depends on if you're already familiar with .NET and ASP.NET in particular or if everything is new to you. Writing a proc, dumping the data in a dataset using a REF CURSOR is as 1 2 3, but the functionality LLBLGen Pro offers will be 1 2 3 as well to you if you don't give up simple_smile . Don't hesitate to ask questions about what seem to be simple things and what bugs you, post a question here or mail support@llblgen.com with your question and you'll get an answer quickly. You'll see, after a few days it is clear to you and it's not working against you anymore.

As for the problem the other day with the datagrid, I was trying to do something which was beyond it's capabilities. I find ASP and .NET promise a lot but when you get down to the detail it's restricted.

It's not that hard in the end I think, but if ASP.NET, .NET are relatively new to you and you then also have to work with an API as LLBLGen Pro offers you, a lot of things are not the way you are probably used to. But don't hesitate to ask questions, even if you think they seem simple, you'll always get an answer here. It's often a small thing, not the right fields, forgot an alias, forgot a sequence definition on a table, etc. etc. which can bug a developer for hours and hours. Just ask here or at our support email address and you'll be helped.

I'll plough on! Have a happy New Year

simple_smile You too, Mike. Don't let software spoil your New Year's Eve wink

Frans Bouma | Lead developer LLBLGen Pro