ObjectDataSource not calling BLL

4 views
Skip to first unread message

Tides

unread,
Apr 25, 2008, 5:17:25 AM4/25/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
I have several pages all working great. The Get, Insert, Delete,
Update pages all fire correctly. I then added this new database table,
BLL and pages for Staff Details, but for some very frustrating reason
the BLL is not firing for the Insert, Update and Delete.

Here is the ObjectDataSource:

<asp:ObjectDataSource ID="StaffDetailsDataSource" runat="server"
DeleteMethod="DeleteStaff" InsertMethod="InsertStaff"
OldValuesParameterFormatString=""
SelectMethod="GetStaffByStaffID"
TypeName="StaffBLL" UpdateMethod="UpdateStaff">
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="ID" Type="Int32" />
<asp:Parameter Name="CompanyID" Type="Int32" />
<asp:Parameter Name="LoginName" Type="String" />
<asp:Parameter Name="FirstName" Type="String" />
<asp:Parameter Name="LastName" Type="String" />
<asp:Parameter Name="ChargeRate" Type="Decimal" />
<asp:Parameter Name="Position" Type="String" />
<asp:Parameter Name="Gender" Type="String" />
<asp:Parameter Name="Birthday" Type="DateTime" />
<asp:Parameter Name="AccessLevel" Type="Int32" />
<asp:Parameter Name="AlarmCode" Type="String" />
<asp:Parameter Name="Notes" Type="String" />
<asp:Parameter Name="AddressDetailsID" Type="Int32" />
<asp:Parameter Name="BankDetailsID" Type="Int32" />
<asp:Parameter Name="LoginEmailAddress" Type="String" />
<asp:Parameter Name="Image" Type="Object" />
</UpdateParameters>
<SelectParameters>
<asp:QueryStringParameter Name="ID" QueryStringField="ID"
Type="Int32" />
</SelectParameters>
<InsertParameters>
<asp:Parameter Name="CompanyID" Type="Int32" />
<asp:Parameter Name="LoginName" Type="String" />
<asp:Parameter Name="FirstName" Type="String" />
<asp:Parameter Name="LastName" Type="String" />
<asp:Parameter Name="ChargeRate" Type="Decimal" />
<asp:Parameter Name="Position" Type="String" />
<asp:Parameter Name="Gender" Type="String" />
<asp:Parameter Name="Birthday" Type="DateTime" />
<asp:Parameter Name="AccessLevel" Type="Int32" />
<asp:Parameter Name="AlarmCode" Type="String" />
<asp:Parameter Name="Notes" Type="String" />
<asp:Parameter Name="AddressDetailsID" Type="Int32" />
<asp:Parameter Name="BankDetailsID" Type="Int32" />
<asp:Parameter Name="LoginEmailAddress" Type="String" />
<asp:Parameter Name="Image" Type="Object" />
</InsertParameters>
</asp:ObjectDataSource>

I have a details view that attaches to this.
Please, before I go insane, does anyone have any suggestions why the
BLL may not be getting called?

Tides

unread,
Apr 25, 2008, 5:17:25 AM4/25/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting

Andrew Badera

unread,
Apr 25, 2008, 12:47:53 PM4/25/08
to DotNetDe...@googlegroups.com
Is the assembly you're calling "the BLL" properly referenced? AKA, is the type you're specifying in-scope for the namespace you're in?
--
--Andy Badera
http://andrew.badera.us/ http://flipbitsnotburgers.blogspot.com/
and...@badera.us
(518) 641-1280
Google me: http://www.google.com/search?q=andrew+badera

SeanJC

unread,
Apr 25, 2008, 7:21:23 PM4/25/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
What I would suggest is that you check your Business Logic Layer (BLL)
to firstly make sure that the classes contained in your BLL namespace
are built correctly.

Next try to create a direct instance of your BLL Class on your page,
and see if you can directly access the methods within, if you can I
would suggest creating a new page with all the elements on it you
want.

One word of warning, it is better to make use of the design pane to
add page elements, so they are correctly referenced in your .net and
the GAC when its built.

If you need any more help, just post, I am sure between Andrew and I
we can sort it out for you.

Thanks
SeanJC

http://buzzproperties.co.uk
http://www.squidoo.com/notjustajax

Tides

unread,
Apr 26, 2008, 10:06:20 PM4/26/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
I would assume it is as the select is firing correctly.
The parameters for the insert / delete / update commands I've left as
auto-generated. I've tried having just a single parameter in each to
no avail.
I've rebuilt the whole set of pages surrounding this functionality
from scratch a couple of times and still it does not fire. Maybe I can
write it in a separate project and import the pages.
The detailsview just is not linking the insert / delete / update
commands with the datasource, but why; the select is working
correctly.
> --Andy Baderahttp://andrew.badera.us/http://flipbitsnotburgers.blogspot.com/

SeanJC

unread,
Apr 28, 2008, 3:58:59 PM4/28/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
You may wish to try making sure that you have defined the functions
within your BLL, that way you can use the wizard for teh object data
source and all the necessary funcitons will be prefilled.

This normally takes the shape of

<System.ComponentModel.DataObjectMethodAttribute _
(System.ComponentModel.DataObjectMethodType.Select, True)> _

and goes just above the function you wish to designate as (in this
case) a select, but you can do the same for all of the other methds,
INSERT, DELETE, UPDATE etc.

One other thing to try is make sure that you have shared functions
within your BLL class and all namespaces needed within your BLL are
present within it, and remove all the parameters from the object data
source itself, adn let the form pass them in.

Can you confirm that you have managed to run this through the
debugger, and actually seen the code hit your BLL code?

Thanks
Sean

http://notjustajax.blogspot.com
http://google-checkout-api.blogspot.com
http://buzzproperties.co.uk
> > Google me:http://www.google.com/search?q=andrew+badera- Hide quoted text -
>
> - Show quoted text -

Tides

unread,
May 19, 2008, 2:16:39 AM5/19/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
As mentioned the debugger was just not getting to the BLL.

I was so dejected with the problem that I had actually given up on it
for a while, but I found an article that got me thinking about temp
files.
I deleted the temp build files in the follwing directory:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

After rebuilding the project it hit the breakpoint in the BLL.
Crazy but we got there. Thanks for your help.


On Apr 29, 5:58 am, SeanJC <sean.conno...@potissimus.co.uk> wrote:
> You may wish to try making sure that you have defined the functions
> within your BLL, that way you can use the wizard for teh object data
> source and all the necessary funcitons will be prefilled.
>
> This normally takes the shape of
>
> <System.ComponentModel.DataObjectMethodAttribute _
> (System.ComponentModel.DataObjectMethodType.Select, True)> _
>
> and goes just above the function you wish to designate as (in this
> case) a select, but you can do the same for all of the other methds,
> INSERT, DELETE, UPDATE etc.
>
> One other thing to try is make sure that you have shared functions
> within your BLL class and all namespaces needed within your BLL are
> present within it, and remove all the parameters from the object data
> source itself, adn let the form pass them in.
>
> Can you confirm that you have managed to run this through the
> debugger, and actually seen the code hit your BLL code?
>
> Thanks
> Sean
>
> http://notjustajax.blogspot.comhttp://google-checkout-api.blogspot.comhttp://buzzproperties.co.uk
> > > Google me:http://www.google.com/search?q=andrew+badera-Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -

Raghupathi Kamuni

unread,
May 19, 2008, 3:17:20 AM5/19/08
to DotNetDe...@googlegroups.com
May be you should delete/clear the "download cache" using the command gacutil /cdl on the visual studio command prompt
 

Andrew Badera

unread,
May 19, 2008, 5:32:03 AM5/19/08
to DotNetDe...@googlegroups.com
Had you tried "clean" and "rebuild" on the solution prior to this?

Do you have SP1 installed for Visual Studio?
--
--
--Andy Badera
http://higherefficiency.net
http://flipbitsnotburgers.blogspot.com/
http://andrew.badera.us/
http://changeroundup.com/
Reply all
Reply to author
Forward
0 new messages