Iphone 请告诉我这个代码中有什么异常
这将导致无效参数异常..:(试试这个Iphone 请告诉我这个代码中有什么异常,iphone,Iphone,这将导致无效参数异常..:(试试这个 NSString *qry=@"UPDATE TABLE USERBASIC SET F_NAME='%@',M_NAME='%@',L_NAME='%@' WHERE REGISTRATIONID='%@'"; NSString *updtQuery=[[NSString alloc] stringWithFormat:qry,fname.text,mname.text,lname.text,userInformationId]; NSLog(@"try
NSString *qry=@"UPDATE TABLE USERBASIC SET F_NAME='%@',M_NAME='%@',L_NAME='%@' WHERE REGISTRATIONID='%@'";
NSString *updtQuery=[[NSString alloc] stringWithFormat:qry,fname.text,mname.text,lname.text,userInformationId];
NSLog(@"try UPDATE %@:",updtQuery);
或
这:
stringWithFormat
是一个类方法;您可以将其用作[NSString stringWithFormat:…]
另见:
- (苹果)
- (上一个堆栈溢出问题)
NSString *updtQuery=[NSString stringWithFormat:qry,fname.text,mname.text,lname.text,userInformationId];
NSString *updtQuery=[[NSString alloc] initWithFormat:qry,fname.text,mname.text,lname.text,userInformationId];
[[NSString alloc] stringWithFormat...]