CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.dotnetnuke.custom_modules Tags:
Item Type: NewsGroup Date Entered: 1/20/2006 2:52:18 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 2 Views: 24 Favorited: 0 Favorite
3 Items, 1 Pages 1 |< << Go >> >|
pkb
Asp.Net User
Fillobject - Record must exit?1/20/2006 2:52:18 PM

0

Not sure if this is the best way of doing this but I would like to test for whether a record exists in the database by creating a business object from it.

If I call the Get<BusinessObjectName> method using the business objects controller, when a record exists in the database I get the business object. However if no record exists in the database rather than a reference of nothing being returned an exception is thrown in the FillObject function.

Should I instead be using a method that returns an arraylist and then test if the arraylists count is greater than zero?

ie

Dim oController as MyBOController
Dim list as Arraylist
list = MyBOController.ListBO
If list.count > 0 then
    .....
Else
    ......
End if





mcsenow
Asp.Net User
Re: Fillobject - Record must exit?1/24/2006 5:50:48 AM

0

How about do a count of the records in your store proc (ex.  select count(*) as recordcount from table xyz)

Then use SQLHelper.ExecuteScalar method to get the recordcount value.  This way, you can avoid return lot of data if your table has lot of records.


Fuji Nguyen
DotNetNuke Modules Issue Tracker, Timesheet, MSSQL Reporting Services, Visitor Counter
dantindall
Asp.Net User
Re: Fillobject - Record must exit?1/24/2006 12:24:45 PM

0

FillObject is throwing an exception because the datareader that you passed in has no records. Check to see that the datareader is populated prior to calling fillobject.
You can then check in your module to see if the arraylist returned is nothing.

Dan Tindall
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
ng.asp-net-forum.dotnetnuke-custom_modules/11 - Web Programming ... How to add item to bottom of module? 0, 1, 5 days ago. Problems with First Module, 0, 1, 5 days ago. Fillobject - Record must exit? 0, 1, 5 days ago ...
Andrei Ignat Blog - engleza Aug 11, 2006 ... For viewing all the Publisher records, we must store in some part the set of records ... public void FillObject(System.Data.IDataReader idr) ...
Youth Level of Service/Case Management Inventory Software ... Dim sXML As String. 'Get 1 record. sXML = FillObject(myAdmin.myAnswers) ...... In order to print Case Management reports, the SDK user must provide the case ...
CodeProject: Building Websites with VB.NET - Chapter 7: Creating ... May 3, 2006 ... Click on the Home page menu item to exit the module definition ..... FillObject _ (EganEnterprises.CoffeeShopListing. _ DataProvider. ...
A+Terminal A-Activity A-Physical AAAEBgNsly AAI-Digest AAdvantage ... ... entangling entdeckers entelluses entelodont entensions enter-exit enter/send ..... filletster filling-in fillobject fillscreen fillstones film-grade ...
IIIIII$ilIIIiiIIIiIiIIIHIIIIi To exit DRAWGRAPH, left-click the 'Exit' button. Note: Before all this, you must do 'xinit' to initialize the X-Window environment if ...
ZBrush Character Creation Jun 24, 2008 ... This will record the entire ZBrush window. In the next line, .... Then open the main Color menu and click the FillObject button (Figure ...
Beginning DotNetNuke 4.0 Website Creation in C# 2005 with Visual ... from fields in a record. Can you guess what it is? The TimePunchInfo class must have properties that have the exact same name as the col- ...
The Visual Basic 5 Programmer's Reference Variable-length Strings are stored with their length, so the length of the record must be at least two bytes longer than the length of the longest string. ...
Andrei Ignat Blog - August, 2006 public void FillObject(System.Data.IDataReader idr) .... For viewing all the Publisher records, we must store in some part the set of records. ...






master pages and non .aspx pages

sitemappath

master page question

master pages dropdownlist component access to content page

content area problem

<%# behavior different in content page???

menu control and sql backend

opening the window in a new browser without address bar

css menu: best way to change the current tab for each selection...

target for an url with sitemap provider

nested tabbed navigation controls

asp.net 2.0, treeview control populateondemand with checkboxes, scanning thru treeview for checked nodes

master page "invalid cast" message

how to write the correct image name in masterpage???

contentplaceholder resize

dropdown vertical navigation menu ( with animation? )

binding textbox.text to treenode

custom sitemap provider and multiple sitemap file

problem with sitemap control and querystring

wizard sidebar

menuitemclick event not raised???

sqlsitemapprovider help

hiding menuitems depending on roles using sitemap

asp .net menu control moving around

wizardstep from separate file?

folder like navigation

menu control -selected node

how do you do dynamic meta tags with a master page?

master pages and loclization

simple button/image-based menu

   
  Privacy | Contact Us
All Times Are GMT