my azure sqldatabase old table are work proper when i insert or get data , but my requirement is new table create and insert data , i create new table using azure studio , table create successfully but i can't insert data on that table when i insert data i got error Like this :
▿ Optional
- some : Error Domain=com.Microsoft.MicrosoftAzureMobile.ErrorDomain Code=-1302 "Cannot POST /tables/QOWResult " UserInfo={com.Microsoft.MicrosoftAzureMobile.ErrorResponseKey=<NSHTTPURLResponse: 0x60000031eea0> { URL: https://myurl/tables/QOWResult } { Status Code: 404, Headers { "Content-Length" = ( 30 ); "Content-Type" = ( "text/html; charset=utf-8" ); Date = ( "Wed, 31 Mar 2021 12:32:54 GMT" ); Server = ( "Microsoft-IIS/10.0" ); "X-Content-Type-Options" = ( nosniff ); "X-Powered-By" = ( Express, "ASP.NET" ); } }, NSLocalizedDescription=Cannot POST /tables/QOWResult , com.Microsoft.MicrosoftAzureMobile.ErrorRequestKey=<NSMutableURLRequest: 0x6000001d30c0> { URL: https://myurl/tables/QOWResult }}
i try create new table with azure portal too but when i insert table data on it , get error above , also i share my code of insert data.
static func addOneWayResult( item: [String: Any], handler: @escaping(QwizzOnewayResult?, Error?) -> Void) {
let table = client?.table(withName: "QOWResult")
table?.insert(item) { (insertedItem, error) in
guard error == nil else {
handler(nil, error)
return
}
handler(QwizzOnewayResult(JSON(insertedItem!)),nil)
}
}
This are my column name of that table :-
[Senderid] nvarchar NOT NULL, [Sendername] nvarchar NOT NULL, [SenderAvtar] nvarchar NOT NULL, [Reciever_id] nvarchar NOT NULL, [Recievername] nvarchar NOT NULL, [RecieverAvtar] nvarchar NOT NULL, [GameID] nvarchar NOT NULL, [Gamename] nvarchar NOT NULL, [WinnerName] nvarchar NOT NULL, [InTime] nvarchar NULL, [AttempCounter] nvarchar NOT NULL, [create_date] [datetime] NOT NULL