Objective c select statement
hey guys im trying to do a SELECT Statement from a local SQLDB so my statement is something like select ..etc..etc WHERE Date =%@,theDate
theDate is an NSString variable. i NSLoged theDate and it returned 22/06/2010
But it doesnt work so i tried the following select ..etc..etc WHERE DATE ='22/06/2010'
And the values came by. any idea why this happens? In the SQLDB, t开发者_运维知识库he column type for DATE is NVARCHAR though. does that matters?
from your question it looks like including single quotes around the %@ token might be worth a shot
"select....etc. etc. ...WHERE Date ='%@'",theDate
精彩评论