Sybase Unwired Platform 2.1.3 を使用して iOS アプリを開発していdate
ます。パラメーターをデータベースに送信中にエラーが発生しました。
ここに私のコードがあります、
@try
{
SUP105Sales_order *insertRow =[[SUP105Sales_order alloc]init];
int32_t idValue =2671;
int32_t custID =103;
int32_t sales =506;
insertRow.id_=idValue;
insertRow.cust_id=custID;
insertRow.order_date=[NSDate date];
insertRow.fin_code_id=@"r1";
insertRow.region=@"Hyd";
insertRow.sales_rep=sales;
[insertRow save];
[insertRow submitPending];
[SUP105SUP105DB synchronize];
}
@catch (NSException *exception) {
NSLog(@"Exception---%@",exception.description);
}
サーバーログ、
2014-02-28 16:39:41.833 WARN Other Thread-182 [SUP105.server.SUP105DB]{"_op":"C","level":5,"code":412,"eisCode":"257","message":"com.sybase.jdbc3.jdbc.SybSQLException:SQL Anywhere Error -157: Cannot convert '' to a timestamp","component":"Sales_order","entityKey":"3210004","operation":"create","requestId":"3210005","timestamp":"2014-02-28 11:09:41.646","messageId":0,"_rc":0}
上記のエラーは日付形式によるものだと思います。Sup サーバーに日付を送信する他の方法をいくつか試しましたが、うまくいきませんでした。
iOSネイティブアプリから列にDATE
フォーマットをsales_order
テーブルに送信する方法は?order_date
あなたの助けに感謝。