The Database object encapsulates all the functionality to do with the the database as a whole. This is mainly
connecting and disconnecting to the database and performing commits and rollbacks.
Properties:
Name
Data Type
Description
Connected
As Boolean
Connected is True when SQL*XL is currently connected to the database and False when it is not connected.
ConnectionType
As Long
litOO4O for Oracle Object for OLE connections or litSQLXLADO for all ADO connections.
Database
As String
Name of the database of the current connection. If Connected = False this property will be "".
UserName
As String
The user who currently connected to the datbase. If Connected = False this property will be "".
Methods:
Name
Parameters
Description
Commit
Close the current transaction by saving the changes if any. Start a new transaction after the commit.
Connect
UserName As String
PassWord As String
DBAlias As String
Optional ConnectionString As String
Optional AllowTransactions As Boolean
Connects SQL*XL to the database using the following connect string: username/password@dbalias. Check the Connected property to check whether the connect was successful. For ADO connections also use the optional ConnectionString parameter. The AllowTransactions parameter can be used to switch off transaction support.
DisConnect
Disconnects from the database. Use the Connected property to check whether SQL*XL is logged on.
Rollback
Close the current transaction by rolling back all changes. Start a new transaction after the rollback.
Example:
Issue a commit and disconnect from the database:
SQLXL.Database.Commit
SQLXL.Database.DisConnect
Copyright (C) 1995-2007 Linker IT
Software BV. All Rights Reserved. Oracle is a registered trademark of
Oracle corporation. Excel and Office are registered trademarks of
Microsoft corporation. Other names appearing on the site may be trademarks
of their respective owners. Software,
files, documents, articles and other material are provided
"as is" and without warranties as to performance or mechantability or
any other warranties whether expressed or implied. No
warranty of fitness for a particular purpose is offered.
sitemap