PDA

Click to See Complete Forum and Search --> : VB with OOP


mutley
Feb 16th, 2001, 11:12 AM
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 ?

Vit
Feb 20th, 2001, 03:28 AM
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)