Results 1 to 2 of 2

Thread: VB with OOP

  1. #1

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Question

    Hi

    Where do I found examples using insert,update,delete, select , but that the app to be OOP , with class

    example: I have a table CUSTOMER

    ID
    name_customer
    address_customer
    phone_customer
    ..
    ..
    fax_customer

    How do I building the app OOP using VB ?

  2. #2
    Lively Member
    Join Date
    Mar 1999
    Posts
    93
    Add a class module to your project.
    In that module create Public subs/functions for each operation you want to perform with customers table, i.e.

    Public sub SaveCustomer()
    Public sub DeleteCustomer(CustomerID)
    etc.

    You may also create properties if you like (not recommended for MTS)

    Now from any place in your program call:

    dim Customer as new clsCustomer
    Customer.DelecteCustomer(yourcurrentcustomer)
    Regards,
    Vit

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