Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 12th, 2003, 10:44 AM
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help with DBObject base class

I have added the code for the DBObject base class as instructed and now I am trying to write a psuedo data and business class that inherits from it just to get familiar with how this works.

As you can see below, I am declaring a public class named "Class1" that inherits from DATA.DataComponents.DBObject (DBObject has identical code to that in the book). I then write a psuedo method (for testing purposes only) called "RunProc", which in turn calls on DBObject's "RunProcedure" method. Everything up to this point works great.

Then, I declare "Class2" a psuedo Business class which instantiates a "Class1" object as "test". Intellisense picks up DBObject's constructor signature and I plug in fake params. The problem is, that when I take my new Class1 "test" object and try to call its new "RunProc" method, Intellisense does not see "RunProc". In other words, nothing happens after type test and dot.

What am I doing wrong here?

- - - -

using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

namespace DATA
{
    /// <summary>
    /// Summary description for Class1.
    /// </summary>
    public class Class1: DATA.DataComponents.DBObject
    {
        public Class1(string newConnectionString) : base(newConnectionString)
        {}
            public void RunProc(string procName,params1,rows)
            {
                base.RunProcedure(theProc,params1,rows);
            }


    }


    public class Class2
    {
        DATA.Class1 test = new Class1(ConfigurationSettings.AppSettings["BocaConnectionString"]);

        //Try to use test's method:

                test.RunProc(string procName,params1,rows);
    }

}


  #2 (permalink)  
Old August 12th, 2003, 06:36 PM
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I figured it out. I was abstracting an extra layer.

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DbObject class rsbst23 BOOK: ASP.NET Website Programming Problem-Design-Solution 1 December 25th, 2004 08:41 PM
Adding Page_Load to base class doesn't work Raeldor BOOK: ASP.NET Website Programming Problem-Design-Solution 2 September 24th, 2004 06:30 AM
Base Class for Code-Behind Problem groupmatch BOOK: ASP.NET Website Programming Problem-Design-Solution 3 September 8th, 2004 05:06 AM
classes :: base class is inaccessible .... Kaliste C# 3 July 16th, 2004 04:56 AM
base class inheritance krunch97 VB.NET 2002/2003 Basics 6 April 23rd, 2004 11:48 AM



All times are GMT -4. The time now is 08:47 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.