DataPortal.Create DataPortal.Fetch "Failed"

DataPortal.Create DataPortal.Fetch "Failed"

Old forum URL: forums.lhotka.net/forums/t/9283.aspx


vbbeta posted on Monday, July 26, 2010

Hi everyone i have this strange problem when I'm trying to call in the UC the new instance or to fetch a account etc I'm getting this exc doesn't matter if I'm calling Create or fetch, its getting more odd when changing the XYZ_DataBinding.DataSource = something else from what I'm looking to get its working just fine

For example if doing mAccount = Account.NewAccount then im getting the exception else if I'm using mAccount = Customer.NewCustomer or whatever its working perfect i have debuged this for hours i cant find a solution to this problem "can someone please help with this"......

My Code is as follow

Public Shared Function Account as account

If Not CanAddObjec Then....

End IF

Return DataPortal.Create(Of Account)()

End Function

 

good luck happy  coding

RockfordLhotka replied on Tuesday, July 27, 2010

You need to look at the InnerException to see what's actually going on.

vbbeta replied on Tuesday, July 27, 2010

I know that i have to do this.

And guess what i have done this. and the exception was that i have to create a instance of a object "that i have to use the 'new' KeyWord in order to get this work" but i have no idea where i have to put in this 'new keyword', and as i mention before is that when i change the name of my data binding source to another source (class(eg instead of Account i use Customer)) everything works fine,

More than this is that this is that this pecific class was used already used in a other project and i didn`t have any problems with it (i didn't made any changes to this when i switch it to this project only in the child fetch or save which wasn't used yet)

Copyright (c) Marimer LLC