See changelog 2002-05-24 08:50 UTC-0300
This commit is contained in:
@@ -343,14 +343,23 @@ HB_FUNC(SQLSRVINFO)
|
||||
_retc( mysql_get_server_info( (MYSQL *)_parnl(1) ) );
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
int filelength( int handle )
|
||||
{
|
||||
int nEnd = hb_fsSeek( handle, 0 , 2 );
|
||||
int nStart = hb_fsSeek( handle , 0 , 0 );
|
||||
return nEnd - nStart;
|
||||
}
|
||||
#endif
|
||||
|
||||
char *filetoBuff(char *f,char *s)
|
||||
{
|
||||
/* int i=0; */
|
||||
|
||||
int i;
|
||||
int fh= hb_fsOpen((BYTE*)s,2);
|
||||
i=hb_fsReadLarge(fh,(BYTE*)f,filelength(fh));
|
||||
int fh = hb_fsOpen( ( BYTE * ) s , 2 );
|
||||
i = hb_fsReadLarge( fh , ( BYTE * ) f , filelength( fh ) );
|
||||
f[ i ] = '\0';
|
||||
hb_fsClose(fh);
|
||||
hb_fsClose( fh );
|
||||
return f ;
|
||||
}
|
||||
|
||||
|
||||
@@ -743,6 +743,7 @@ 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
|
||||
|
||||
ENDCLASS
|
||||
|
||||
@@ -780,6 +781,16 @@ METHOD SelectDB(cDBName) CLASS TMySQLServer
|
||||
return .F.
|
||||
|
||||
|
||||
METHOD CreateDatabase ( cDataBase ) CLASS TMySQLServer
|
||||
local cCreateQuery := "CREATE DATABASE "+ lower(cDatabase)
|
||||
|
||||
if sqlQuery(::nSocket, cCreateQuery) == 0
|
||||
return .T.
|
||||
endif
|
||||
|
||||
return .F.
|
||||
|
||||
|
||||
// NOTE: OS/2 port of MySQL is picky about table names, that is if you create a table with
|
||||
// an upper case name you cannot alter it (for example) using a lower case name, this violates
|
||||
// OS/2 case insensibility about names
|
||||
|
||||
Reference in New Issue
Block a user