KET Art

KET Logo
unreal computation

KET Art

IguanoidWare: IwDBS

Page Index
  1. The Package
  2. Some details
  3. Class Interfaces Definitions
  4. Installation tips
  5. Some example code
  6. Download
  • The Package:

    The package contains (will contain?? need a small time do publish...) some elements:

    • IwDB.dll: is the library core... an ActiveX DLL written in Visual Basic.
    • ASP: is a directory that contains the files you need to put in a (custom) folder of the web server you are using. If you don't plan to use a remote connection you don't need it. If you need, instead, you have to put the files in a web directory visible from the extern.
    • Tutorials: probably I will put in a direcory some tutorials and example projects to explain the usage of the library. You will find some example code on this page too... Take a look to have an idea of how the library works and how to use it.

  • Some details:

    First of all, the few, simple methods of the object supplied by this DLL, set up the more often used (surely by me. I think not just...) options for a use with a M$-Access database (but it could work with other too... I think... if they supports all the features used by this library) and manages a connection-less use of ADO.Recordset objects (as suggested by M$...). But the real power of this library is that it can manage, with the same class interface, a local (or LAN) connection and a REMOTE connection. This means that you can write software in Visual Basic (or other languages that supports this kind of DLLs) that read and write to a database located on a web-server on the NET. It's not all... with the same code, your programs, can use a local or remote database, without the need of changing a line of code... only setting a little property...
    This is the ConnectionType property of the IwConnection object that can be set on IwLocal or IwRemote.
    Coming soon other details...

  • Class Interfaces Definitions:

    Main class is IwDB.IwConnection.
    Here's a list of public class members:

    Property ASPPath As String
    Sets/Returns the path on the remote host where are located the IwDBS library ASP files (used only in remote connections)


    Sub BeginTrans()
    Just like ADO.Connection counterpart (nestable)


    Sub CommitTrans()
    Just like ADO.Connection counterpart


    Sub Connect()
    Simple... mh? No routine arguments (use class properties)


    Property ConnectionType As IwDB.IwConnectionType
    Sets/Returns the kind of connection (IwCNLocal, IwCNRemote)


    Property DBName As String
    Sets/Returns the name of the database file (without path)


    Property DBPassword As String
    Sets/Returns the database password (is used). Users and groups are not supported yet.


    Property DBPath As String
    Sets/Returns the path where is located the database file (used in both local and remote connections)


    Sub Disconnect()
    Self explaining... ;)


    Property DoEventsWhileLoading As Boolean
    Setting this to true causes the form's events to be executed while a http request is sent to remote host (DoEvents is called repeatedly while waiting for HTTP response. Used only in remote connections)


    Sub Execute(sSQL As String)
    Similar to ADO.Connection counterpart but only the command argument is used. Note that it is a Sub so it return no recordset objects.. to do this, use the GetRs function instead (they was implemented as two separate methods for speed reasons in the case of a remote connection).


    Function GetRs(sSQL As String) As ADODB.Recordset
    Similar to ADO.Connection.Execute function. Note that there is only the command argument and that you have to use the Execute() routine where you don't need a recordset to be returned (Ex. a SQL DELETE query) for speed reasons.


    Property HostName As String
    Set/Returns the name of the remote host where database and IwDBS library ASP files are located (Do not specify ant protocol or path. Ex "www.myhost.com")


    Sub RollbackTrans()
    Just like ADO.Connection counterpart


    Function SaveRs(Rs As ADODB.Recordset) As ADODB.Recordset
    This is an important class member.
    When you get a recordset object through the GetRs() function, it returns it in connection-less mode, so changes are not written to disk until you call this function. When using a remote connection set the recordset object that you are saving to the one that is returned by the function to get autonumber values generated by database driver or similar data. See code examples.


    Property Settings As IwDB.IwInternalCNData
    The only aim of this property is to quikly create a clone connection to anothes one without the need of copying all properties manually. To do this you have to set only the ConnectionType Property and THEN the Settings property, so you can call Connect() method.


    Property ShowWaitMessage As Boolean
    NOT COMPLETED YET!!!
    Setting this property to true causes a built-in wait dialog box to appear while doing HTTP requests.


    There is another creatable class in the library (IwConnectionWizard) that implements a connection wizard to help software users choose a database to connect to. This class is not completed yet. Please not use.

  • Installation tips:

    Not available yet... I'm sorry for the inconvenience... coming soon!

  • Some example code:

    I put some example code... without too much comments... for now. This code speaks by itself...
    This is the code needed for a local connection/disconnection and a read/write from DB. Just simple, uhm?


    Private Sub CmdLocalConnect_Click()
        'Connection to a local DB using
        'global instance of IwDB.IwConnection class
        ConnectionType = IwLocal
        DBName = "MyDB.MDB"
        DBPath = App.Path & "\"
        Connect
    End Sub


    Private Sub CmdAddRecord_Click()
        'Get an empty recordset
        'and add record(s)
        'using global member functions
        'GetRs() and SaveRs()
        Dim Rs As ADODB.Recordset
        Dim MyID As Long
        
        Set Rs = GetRs("SELECT * FROM MyTable WHERE ID=" & -1)
        'Now Rs is "connectionless"...
        'so Rs.ActiveConnection is now Nothing
        'and changes are not made on disk
        Rs.AddNew 'add a record
        Rs("Username") = "MrBrown"
        Set Rs = SaveRs(Rs) 'Now saving the rs
        '"Set Rs = SaveRs(Rs)" is needed only
        'for remote CNs. In local mode
        'a "SaveRs Rs" should work
        'but this longer syntax works always.
        MyID = Rs("ID") 'reading an autonumber value
        Set Rs = Nothing
    End Sub

    Private Sub CmdDisconnect_Click()
        Disconnect
    End Sub


    Other code is arriving soon...

  • Download:

    Not available yet... I'm sorry for the inconvenience... coming soon!

15/10/2005 Added media streming technology to our web-site (Art/Pieracci section)
01/09/2005 Coming new work from Pieracci (Art Section)
01/09/2005 Added Marcolino's Page (Art Section)
13/08/2005 Added Site-Map page
09/08/2005 Added IwDBS page (IguanoidWare section)
22/07/2005 (Night) Ended changing. Faster access now
22/07/2005 Started changing web site structure again
(all sections)
04/07/2005 Started working on IguanoidWare Page(s)
30/06/2005 Almost ended changing... now Poesia WebSite....
28/06/2005 Started changing web site structure
(all sections)
05/06/2005 Link-Sharing added
(Link section)
17/04/2005 Ale Notempo Artist added
(Art section)
17/04/2005 Selvaggia page updated
(Art section)
21/03/2005 Davide Artist added
(Art section)
13/03/2005 Massimetto Artist added
(Art section)
22/02/2005 Selvaggia Artist added
(Art section)
02/02/2005 MP3 added
(Dada section)
30/01/2005 The web site is born.
K.E.T. inc. , ROMA
webmaster: Iguana
Digger motore di ricerca