View Single Post
Old August 12th, 2003, 10:44 AM
projectedNexus projectedNexus is offline
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)


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

        //Try to use test's method:

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