|
|
DalAddin is an Addin for Visual Basic 6.0 wich facilitates
enormously the development of applications in N-tiers with SQL Server,
smartly generating a great part of the data layer including store
procedures for insert, delete, update, select by the primary key,
select by indexes, select for each foreign key and select for each
part of all the foreign key and primary key. Besides, it generates
the sekeleton of the routines of business layer. All this with an
excellent error handling system that logs the error in a XML file,
including all the parameters of the function wich generates the
error and the most important properties of the objects connection,
command and recordset involved in the error.
In only three steps:
Two ways: Automatic
per table: 1. Connect to a SQL Server.
2. Select the database. 3.
Select the tables and press the Generate button.
DalAddin will include in your active proyect:
| • |
A module with data access routines. |
| • |
References to COM+, Microsoft
XML and ADO. |
| • |
A module with COM+ and error
handling routines. |
| • |
For each table selected it
will include a class with the following methods: |
| |
o |
Add(updatable fields). This
method executes a store procedure generated by DalAddin wich
inserts a record in the table and if the table has an identity
column, it returns it as a result. |
| |
o |
Delete(PrimaryKey or IdentityColumn). This
method executes a store procedure generated by DalAddin wich
delete a record from the table. |
| |
o |
Update(TableFields). This method executes
a store procedure generated by DalAddin wich updates a record
searching for it through the PrimaryKey or IdentityColumn and
returns the amount of updated records (1 if it was found or
0 if it was not found). |
| |
o |
GetAll(). This method executes a store
procedure generated by DalAddin wich returns all the records. |
| |
o |
Get[TableName]( PrimaryKey or IdentityColumn).
This method executes a store procedure generated by DalAddin
wich returns a record looking for it thruogh the primary key
or identity column. |
| |
o |
Get[TableName]By[KeyColumns]( KeyColumns).
It generates a method for each foreign key and another one for
each field of the key. |
Manual per stored procedure:
1. Connect to a SQL Server. 2.
Select the database. 3. Select the tab Generate
From Store Procedure, select the stored
procedure and press:
| • |
Generate VB Method
Return RS: if the store procedure is a select. You
will obtain the code of the method to call that Store Procedure. |
| • |
Generate VB Method Return Int:
you will obtain the code of the method to call that Store Procedure.
If the Store Procedure has an output parameter it returs it,
if not it returns the amount of records affected by the Store
Procedure. |
| • |
Generate VB Bus Method Return Int:
you will obtain the code of the method to call to the routine
of the data layer wich executes the Store Procedure. |
| • |
Generate VB Bus Method Return RS:
you will obtain the code of the method to call to the routine
of the data layer wich executes the Store Procedure. |
|