CodeSmith Community
Your Code. Your Way. Faster!

DataProvider getting System.NotImplementedException???

Latest post 05-08-2008 11:07 AM by blake05. 5 replies.
  • 04-28-2008 2:42 PM

    DataProvider getting System.NotImplementedException???

    I recently added about 10 more tables to my database.  When I run NETTIERS to generate source code and then run the application I am getting an error when it tries to instantiate the DataProvider through NetTiersProvider dataProvider = ConnectionScope.Current.DataProvider;".  If I look at the online help I can see that a lot of the providers have the following error: dataProvider.<%TableName%>Provider threw an exception of type 'System.NotImplementedException'. 

    I hope someone knows what the solution is for this because I have been working on this for about three days now trying to figure this out.  What would cause several of my tables to now have the correct Provider?  I have a screen shot of the error if anyone is interested in seeing it please take a look at www.blinfo.com/error.bmp.

    Any help greatly appreciated...
    Joe

    The code that is being run is as follows:

    public virtual TList<TestTable> GetAll(int start, int pageLength, out int totalCount)
    {
    // throws security exception if not authorized
    SecurityContext.IsAuthorized("GetAll");
    // get this data
    TList<TestTable> list = null;
    totalCount = -1;
    TransactionManager transactionManager = null;
    try
    {
    //since this is a read operation, don't create a tran by default, only use tran if provided to us for custom isolation level
    transactionManager = ConnectionScope.ValidateOrCreateTransaction(noTranByDefault);
    NetTiersProvider dataProvider = ConnectionScope.Current.DataProvider;
    //Access repository
    list = dataProvider.TestTableProvider.GetAll(transactionManager, start, pageLength, out totalCount);
    }
    catch (Exception exc)
    {
    //if open, rollback, it's possible this is part of a larger commit
    if (transactionManager != null && transactionManager.IsOpen)
    transactionManager.Rollback();
    //Handle exception based on policy
    if (DomainUtil.HandleException(exc, layerExceptionPolicy))
    throw;
    }
    return list;
    }

    • Post Points: 35
  • 04-30-2008 8:21 PM In reply to

    • blake05
    • Top 25 Contributor
    • Joined on 04-03-2008
    • Wisconsin
    • Posts 236
    • Points 4,115

    Re: DataProvider getting System.NotImplementedException???

    Reply |Contact |Answer

    Hey,

    Did you generate the template to a new output directory? Also are you compiling the NetTiers project right after generating?

    I always generate NetTiers to a new output directory, compile that and then start attaching those assemblies as a project reference. If you have problems compileing the NetTiers solution than I would see about updateing your templates and/or checking your database schema as this is the first indicator that something is majorly wrong.

    Thanks
    -Blake Niemyjski

    Blake Niemyjski

    CodeSmith Tools, LLC Support Specialist

    Blog: http://windowscoding.com/blogs/blake/

    ----------------------------------------------------------------------
     Member of the .NetTiers team | Visit http://www.nettiers.com
    ----------------------------------------------------------------------

    • Post Points: 35
  • 05-06-2008 7:19 AM In reply to

    Re: DataProvider getting System.NotImplementedException???

    Yes,

     I delete the current NETTIERS folder before generating to the output directory.  When I open Visual Studio (2008) it lets me know that there is a new version out there and asks me if I want to upgrade the projects so I am sure it is getting the new generated code.  I have been out this previous week on a business trip and am back now.  Any other help would be greatly appreciated...

    Thanks,
    Joe

    • Post Points: 35
  • 05-08-2008 9:21 AM In reply to

    • blake05
    • Top 25 Contributor
    • Joined on 04-03-2008
    • Wisconsin
    • Posts 236
    • Points 4,115

    Re: DataProvider getting System.NotImplementedException???

     Hello Joe,

    Could you please email me your .netTiers (.csp) project file and database schema, and I'll see what I can do.

    Thanks

    Blake

    Blake Niemyjski

    CodeSmith Tools, LLC Support Specialist

    Blog: http://windowscoding.com/blogs/blake/

    ----------------------------------------------------------------------
     Member of the .NetTiers team | Visit http://www.nettiers.com
    ----------------------------------------------------------------------

    • Post Points: 35
  • 05-08-2008 10:45 AM In reply to

    Re: DataProvider getting System.NotImplementedException???

    Reply |Contact |Answer
    Blake, Thanks for responding.  I feel like NETTIERS has a lot to offer but the response time is just too slow sometimes.  Anyways, enough ranting.   

    Last night I discovered my problem.  It seems there were some DLLs within the BIN folder that the program was using instead of the included projects.  Once I deleted the DLLs and re-compiled then my new code is working again.

    • Post Points: 35
  • 05-08-2008 11:07 AM In reply to

    • blake05
    • Top 25 Contributor
    • Joined on 04-03-2008
    • Wisconsin
    • Posts 236
    • Points 4,115

    Re: DataProvider getting System.NotImplementedException???

    Your welcome Smile,

    I just wanted to let you know that we are working on getting the response times down.

    Thanks

    -Blake

    Blake Niemyjski

    CodeSmith Tools, LLC Support Specialist

    Blog: http://windowscoding.com/blogs/blake/

    ----------------------------------------------------------------------
     Member of the .NetTiers team | Visit http://www.nettiers.com
    ----------------------------------------------------------------------

    • Post Points: 5
Page 1 of 1 (6 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems