将NSString转换为UTF8String时出错

-(id)select:(NSString *)original_query { sqlite3_stmt *statement; const char * converted = [original_query UTF8String]; NSLog(@"[INFO] converted char = %@", converted); if (sqlite3_prepare_v2(db, converted, -1, &statement, NULL) != SQLITE_OK) { @throw [NSException exceptionWithName: @"DB Encriptor" reason: [NSString stringWithFormat: @"Query \"%s\" has failed, we could not execute the SQL statement. '%s'", converted, sqlite3_errmsg(db) ] userInfo: nil]; } else { @try { ... } @catch (NSException * e) { NSLog(@"Exception: %@", e); return NULL; } } } 

当执行到达线时:

 const char * converted = [original_query UTF8String]; 

我得到以下错误:

  2013-06-27 02:17:33.505 proof[25200:3c03] -[__NSArrayM UTF8String]: unrecognized selector sent to instance 0xc954a30 

这可能是一个非常简单而愚蠢的错误,如果有人能给我一些指导,我将不胜感激,我花了几个小时尝试不同的模式,将string转换为UTF8,但迄今为止没有成功。

谢谢!

编辑:一些更多的信息:我正在创build一个本地iOS模块沿titanium工作。 我从JavaScript中调用这个方法(在Titanium中)传递一个string,如下所示:

  encriptmydb.select("SELECT count(*) FROM sqlite_master;") 

但是错误依然存在