ConnectX 1.00
Copyright (c) 2000 SamSoft PTY LTD
All Rights Reserved.
=============================================================
Table of Contents
=============================================================
1. System Requirements
Any Microsoft Windows operating system that supports 32 bit applications
=============================================================
2. Software require
Microsoft Data Access Component (MSDC) 2.0 or later version. You can download this
Free from Microsoft site.
=============================================================
3. Overview
ConnectX is an easy to use 32 bit COM component that provides to connectivity to most any databases so that developers no longer have to worry about data access method. Because it uses the Microsoft OLEDB, it provides access to any database that is ODBC compliant via OLEDB provider for ODBC. ConnectX comprises just one member class ConnectMe which has methods and properties that will enable you to simply and consistently connect any ODBC compliant database to access data and run stored procedures.
=============================================================
4. Installation
1. Register ConnectX.dll by using regsvr32.dll or any other utility
2. Open your VB project and select the menu item Project - References and check Samsoft ConnectX as well as Microsoft ActiveX Object 2.x Library.
=============================================================
5. Object Model
Methods
Method |
Type |
Parameters |
Return Value |
Description |
Connect |
Public |
|
Returns an ADO connection |
This use to connect to any ODBC compliant database |
GetRecordSet |
Public |
|
ADO Recordset |
Returns a recordset for manipulation. |
Execute |
Public |
|
None |
Executes a stored procedure. |
Property |
Type |
Direction |
Description |
DSN |
string |
Read only |
This is the data source name with which connection to the database is made. It is a read only data member of the class, exposed via public property Get methods – DSN. |
UserID |
string |
Read only |
This is the userid with which connection to the database is made. It is a read only data member of the class, exposed via public property Get methods – UserID. |
Password |
Read only |
This is the Password with which connection to the database is made. It is a read only data member of the class, exposed via public property Get methods – Password. |
6. Example
This example provides connectivity to an ODBC compliant database, returns a query and runs a stored procedure.
Private Sub Command1_Click()
Dim objConnectX As New ConnectMe
Dim rsConectX As New Recordset
'the following line connects you to a database with DSN - SamSoftdb, UserId - Sam and Password - Okey.
objConnectX.Connect "SamSoftdb", "Sam", "Okey"
'the following line returns all records in tblOrder assuming that you have such table in your database
Set rsConectX = objConnectX.GetRecordSet("Select* from tblorder")
'the following line deletes all records in tblOrder assuming that you have such table in your database
objConnectX.Execute "Delete from tblorder "
Exit Sub
End Sub
7. Other SamSoft Products
This product is free. For other quality products from SamSoft, please visit our website at
www.GoSamSoft.com