Business Object in Web Application


Author
Message
Hugo R. Figueroa
Hugo R. Figueroa
StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)
Group: StrataFrame Users
Posts: 81, Visits: 3.1K
I have a solution with 3 projects:

1)  winform application project

2) webform application project

3) business object project

I am making maintenance forms for projects 1 & 2 using the business objects in project 3.

everything is ok, but when trying to set the bindingfield for the textboxes in one webform I get this message:

"The selected business object name doeas not appear to be valid. The fields could not be enumerated"

I can select the business object by means of the BusinessObjectName Property and I used the same object succesfully in the winform counterpart, and certainly haven't had problems with other business objects.

I have deleted the business object, created and configured it again, built and rebuilt all the projects, have shutdown visual studio and the computer. but still the same.

Please somebody can tell me what can be wrong?

Thanks

Guillermo Vilas
Guillermo Vilas
StrataFrame User (162 reputation)StrataFrame User (162 reputation)StrataFrame User (162 reputation)StrataFrame User (162 reputation)StrataFrame User (162 reputation)StrataFrame User (162 reputation)StrataFrame User (162 reputation)StrataFrame User (162 reputation)StrataFrame User (162 reputation)
Group: StrataFrame Users
Posts: 112, Visits: 2.3K
Did you added a reference to the BusinnesObject in the ApplicationBasePage under the App_Code Folder?

------------------------------------------------------------------------
I would like to change the world, but they don´t give me the source code.
MS Windows 7 Ultimate 64-Bit
Intel(R) Core(TM)2 Quad CPU Q9300 2.50 GHz
6.00 GB of RAM, NVIDIA GeForce 9800 GT

MacBook Pro i5 OSX Lion
Hugo R. Figueroa
Hugo R. Figueroa
StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)
Group: StrataFrame Users
Posts: 81, Visits: 3.1K
yes, I did it.
Hugo R. Figueroa
Hugo R. Figueroa
StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)
Group: StrataFrame Users
Posts: 81, Visits: 3.1K
Thank you Guillermo

What I did wrong was to create  a second applicationbasepage (applicationbasepage2) and add the reference there.

Now I put the reference in the original applicationbasepage and  I can fill in the bindingfield property.

But, if I have a lot of business objects I can't put all them there.

I have to reread the help because I am missing something.

PS: Do you play tennis?BigGrin

Hugo R. Figueroa
Hugo R. Figueroa
StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)
Group: StrataFrame Users
Posts: 81, Visits: 3.1K
The help says:

Multiple ApplicationBasePage Classes

As a whole, a StrataFrame ASP.NET application may use hundreds of different business objects, while each page needs 10 or less. Rather than requiring you to declare of the business objects for the entire application on the same ApplicationBasePage, you can create separate ApplicationBasePage classes. The webforms within the application can then inherit from the ApplicationBasePage that contains only the business objects it needs.

But if I put the business objects references in another ApplicatioBasePage I get the error mentioned at the beginning of this topic.

StrataFrame Team
S
StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
When you placed the business objects in another base page class, did you change the inherits of your web form to reference the new base page, or does it still reference the original ApplicationBasePage?  You'll need to change the inherits to subclass the new ApplicationBasePage and build the project before the type editor will work.
Hugo R. Figueroa
Hugo R. Figueroa
StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)
Group: StrataFrame Users
Posts: 81, Visits: 3.1K
Yes , I did it.

A even shutdown visual studio and the computer, and rebuilt before and after that.

Hugo R. Figueroa
Hugo R. Figueroa
StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)
Group: StrataFrame Users
Posts: 81, Visits: 3.1K
Now I am getting this message when trying to build or rebuild the project:

Error 1 Invalid access to memory location. (Exception from HRESULT: 0x800703E6) D:\Visual Studio 2005\WebSites\reto\web.config 29 

Then, I created another web project and I am getting the same error.

Crazy

StrataFrame Team
S
StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
That's odd that you would be getting that error.  Is the error only occuring on a StrataFrame web site project, or any web site project?  When I Googled your error message, I found this site, http://www.xerratus.com/2006/03/24/AnnoyingInvalidAccessToMemoryLocationExceptionSolution.aspx, which says that this might be a problem with VS referencing the Microsoft.SqlServer DLLs, so you might try removing them from your references in the web.config file.
Hugo R. Figueroa
Hugo R. Figueroa
StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)
Group: StrataFrame Users
Posts: 81, Visits: 3.1K
I am only doing strataframe projects ( I'm coming from VFP and was reluctant to learn .net  until I discovered STRATAFRAME).

I've tried removing those Microsoft.SqlServer lines from web.config, but everytime I rebuild the project they appear again.

If I rebuild several times, sometimes the error doesn't show; but I still have the original problem ( I can select the business object from BusinessObjectName, but when trying to set the bindingfield property  I get the message :

"The selected business object name doeas not appear to be valid. The fields could not be enumerated"

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search