[Mysql-cocoa-commits] CVS: SMySQL/CLI_Test main.m,1.1,1.2
Brought to you by:
sergecohen
From: Serge C. <ser...@us...> - 2004-03-01 12:08:07
|
Update of /cvsroot/mysql-cocoa/SMySQL/CLI_Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17746 Modified Files: main.m Log Message: Small changes to the main.m source of the CLI_Test application. 2004-03-01; Serge Cohen. Index: main.m =================================================================== RCS file: /cvsroot/mysql-cocoa/SMySQL/CLI_Test/main.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** main.m 16 Aug 2003 20:36:23 -0000 1.1 --- main.m 1 Mar 2004 11:49:17 -0000 1.2 *************** *** 31,39 **** #import <Foundation/Foundation.h> ! #import <SMySQL/SMySQL.h> int main (int argc, const char * argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; ! MCPConnection *connection; MCPResult *result; NSArray *names, *types; --- 31,39 ---- #import <Foundation/Foundation.h> ! #import <SMySQL_static/SMySQL_static.h> int main (int argc, const char * argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; ! MCPConnection *connection, *connect2; MCPResult *result; NSArray *names, *types; *************** *** 91,94 **** --- 91,107 ---- [connection release]; + + // Test of the init first, then connect (after having some option setted): + ///* + connect2 = [[MCPConnection alloc] init]; + [connect2 setConnectionOption:CLIENT_SSL toValue:YES]; + [connect2 connectWithLogin:@"ObjC" password:@"MySQL_class" host:@"localhost" port:0 socket:nil]; + [connect2 selectDB:@"test_mysqlclass"]; + result = [connect2 listTables]; + NSLog (@"Using connect2 : Here is the NSLog of a MCPResult (listTables) : \n%@", result); + result = [connect2 queryString:@"select * from test1"]; + NSLog (@"Using connect2 : content of table test1 : \n%@", result); + NSLog (@"Here comes the last error information : %@\n", [connect2 getLastErrorMessage]); + //*/ [pool release]; return 0; |