LTPDA Toolbox | contents | ![]() ![]() |
Connection to an LTPDA Repository uses the JDBC interface of the Database toolbox. The command
mysql_connect can be used to connect to a repository. You pass the function a hostname for the
repository and a database name to connect to. You will then be prompted for a valid username and password.
Here is an example call:
>> [conn, username] = mysql_connect('localhost', 'ltpda_test')
** Connecting to localhost as ltpdaadmin...
** Connection status:
DatabaseProductName: 'MySQL'
DatabaseProductVersion: '5.0.45'
JDBCDriverName: 'MySQL-AB JDBC Driver'
JDBCDriverVersion: [1x103 char]
MaxDatabaseConnections: 0
CurrentUserName: 'ltpdaadmin@localhost'
DatabaseURL: 'jdbc:mysql://localhost/ltpda_test'
AutoCommitTransactions: 'True'
To disconnect from the server, use the close method of the database class:
>> close(conn)
![]() |
What is an LTPDA Repository | Submitting LTPDA objects to a repository | ![]() |
©LTP Team