MySQLDatabase
Class MySQLDatabase (Inherits from
Database)
| Property | Description
|
| Port As Integer | Specifies the port used by the MySQL database server. This defaults to 3306, which is the standard MySQL port.
|
| Timeout As Integer | Specifies the timeout (in seconds, the default is 15)
|
| Method Prototype | Description
|
| Function GetAffectedRows() As Integer | Returns of the number of rows that were processed by the last SQLExecute command
|
| Function GetInsertID() As Integer | Returns the last auto-generated key created by the database. This is useful after an INSERT statement to get the key of the row that was just created.
|
| Sub LogPackets( location As FolderItem ) | Specifies that MySQL network packets should be logged to the specified file
|
Example:
Dim myDB As New MySQLDatabase
myDB.Host = "localhost"
myDB.UserName = "admin"
myDB.Password = "YoUrPaSsWoRd"
If Not myDB.Connect Then
Print "Error connecting to database!"
End If