|
|
DataPath
|
Gets or sets the location of the data for a database.
|
|
DbFlags
|
Gets or sets the database flags for a database. This property is an enumeration. See Database Flags for a list of possible values.
|
|
DdfPath
|
Gets or sets the dictionary path for a database.
|
|
Name
|
Gets or sets the name of the database.
|
|
Secured
|
Returns whether the database has security enabled. (0=unsecure, 1=secure)
|
|
Session
|
Gets or sets the Session object associated with this DtoDatabase object.
|
The Secure and UnSecure methods can only be used when the database is closed.
' instantiate session object and connect to server Dim my_session as New DtoSession Dim result as DtoResult result = my_session.Connect("myserver", "username", "password") ' now use your session object to obtain db collection Dim my_databases as DtoDatabases Set my_databases = my_session.Databases ' get first database and query its dictionary path Dim first_database as DtoDatabase Dim dictionarypath as string Set first_database = my_databases(1) dictionarypath = first_database.DdfPath
DtoDatabases Collection
DtoDictionary Object
Opens a connection to the database with the given username and password.
|
result
|
DtoResult long value indicating the result of the method call. Use the Error property of the DtoSession Object to obtain a description for the result.
|
This operation is used in order to open a set of dictionary files. This set must contain FILE.DDF, INDEX.DDF and FIELD.DDF. It may also contain a number of optional DDF files. Remember to call the Close method to free memory. Once the database is opened, no one else can make changes to it until the Close method is called.
You cannot issue the Secure or UnSecure methods while the database is open.
More information on the errors returned by the method can be obtained using the Error property of the DtoSession Object.
Dim m_session as new DtoSession Dim m_database as new DtoDatabase Dim result as DtoResult result = m_session.Connect("myserver","user","pwd") m_database.Session = m_session m_database.Name = "DEMODATA" result = m_database.Open("dbuser","pwd")
Closes a set of data dictionary files that were opened using the Open method.
|
result
|
DtoResult long value indicating the result of the method call. Use the Error property of the DtoSession Object to obtain a description for the result.
|
Call this method after the database has been opened using Open method. Error information can be obtained using Error property.
Dim m_database as new DtoDatabase Dim result as DtoResult result = m_database.Open("dbuser","pwd") ' perform operations here ' result = m_database.Close
Creates a new database based on the current one.
|
result
|
DtoResult long value indicating the result of the method call. Use the Error property of the DtoSession Object to obtain a description for the result.
|
Referential integrity is preserved in the copied database.
More information on the errors returned by the method can be obtained using the Error property.
Dim Database As New DtoDatabase Dim result as DtoResult Database.Session = my_session ` assume session exists Database.Name = "DEMODATA" ` no user name or password, unsecure database result = Database.Copy("", "", "DEMODATA2", "C:\PVSW\DEMODATA2", "C:\PVSW\DEMODATA2") If NOT result = Dto_Success Then MsgBox "Error"+ Session.Error(result) End If
Enables security for a database.
|
Object
|
DtoDatabase object
|
|
user
|
User should be set to "Master" for securing the database.
|
|
password
|
Password for the Master user.
|
|
result
|
DtoResult long value indicating the result of the method call. Use the Error property of the DtoSession Object to obtain a description for the result.
|
When you enable database security, you must specify Master as the database user name and choose a password. Security for the database is enforced based on the access rights defined for the database, and should match behavior seen in SQL or ODBC interfaces.
Ensure that the database is closed when attempting to enable security.
More information on the errors returned by the method can be obtained using the Error property of the DtoSession Object.
Dim m_database as new DtoDatabase Dim result as DtoResult m_database.Name = "DEMODATA" m_database.Session = my_session ` assume session exists result = m_database.Secure("Master", "password")
Disables security for a database.
|
Object
|
DtoDatabase object
|
|
user
|
User should be set to "Master" for unsecuring the database.
|
|
password
|
Password for the Master user.
|
|
result
|
DtoResult long value indicating the result of the method call. Use the Error property of the DtoSession Object to obtain a description for the result.
|
When you disable database security, you must specify Master as the database user name and provide the Master user password.
Ensure that the database is closed when attempting to disable security.
More information on the errors returned by the method can be obtained using the Error property of the DtoSession Object.
|
Chapter contents
Prev topic: DtoDatabases Collection
|