Results 1 to 4 of 4

Thread: OOP Question

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2002
    Posts
    68

    OOP Question

    How can I used the object called babs and use one of its properties in the class it is delcared from. Specificlly I am calling the Connect method and I need the underlying function to use the _datastoreType that was setup up for this object. _datastoreType is a place holder for the Enum type DataStoreTypes which I have created. Could I pass the object itself and how would I go about passing the object or could the class work on the properties that have already been set for the object. Please post any code ideas you may have.

    PS: I am working on creating a generic Data Access Layer any comments or ideas are greatly apprecatied.

    Thanks




    Dim babs As New DAL_Properties()
    babs.Connect()


    Public Class DAL_Properties


    #Region "EnumDataStoreType"

    Public Enum DataStoreTypes
    SQLServer = 1
    Access = 2
    Flatfile = 3
    UNDEFINED = 4
    End Enum

    #End Region


    #Region "Private Properties"

    Private _databaseName As String
    Private _dataSourceName As String
    Private _userName As String
    Private _password As String
    Private _connectionString As String
    Private _command As String
    Private _datastoreType As DataStoreTypes

    #End Region

    #Region "Public Methods"

    Public Function Connect()

    Select Case

    Case SqlServer

    Case Access

    end select
    End Function
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width