diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1a385f3e29..4b1be284bb 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -15,6 +15,9 @@ under different terms, please contact respective author(s). The license applies to all entries newer than 2009-04-28. */ +2010-07-08 10:32 UTC+0200 Jacek Kubica (kubica@wssk.wroc.pl) + * contrib/hbmysql/tmysql.prg + + Added Method DeleteDatabase( cDataBase ) CLASS TMySQLServer 2010-07-08 09:24 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/vm/macro.c diff --git a/harbour/contrib/hbmysql/tmysql.prg b/harbour/contrib/hbmysql/tmysql.prg index b2cc71a56d..09b2ec35e8 100644 --- a/harbour/contrib/hbmysql/tmysql.prg +++ b/harbour/contrib/hbmysql/tmysql.prg @@ -1342,6 +1342,7 @@ CREATE CLASS TMySQLServer METHOD NetErr() INLINE ::lError // Returns .T. if something went wrong METHOD Error() // Returns textual description of last error METHOD CreateDatabase( cDataBase ) // Create an New Mysql Database + METHOD DeleteDatabase( cDataBase ) // Delete database METHOD sql_Commit() // Commits transaction [mitja] METHOD sql_Rollback() // Rollbacks transaction [mitja] @@ -1561,6 +1562,16 @@ METHOD DeleteTable( cTable ) CLASS TMySQLServer RETURN .F. +METHOD DeleteDatabase( cDataBase ) CLASS TMySQLServer + + LOCAL cDropQuery := "DROP DATABASE " + Lower( cDBName ) + + IF mysql_query( ::nSocket, cDropQuery ) == 0 + RETURN .T. + ENDIF + +RETURN .F. + METHOD Query( cQuery ) CLASS TMySQLServer