Madhurendra Singh
Posts: 0
Joined: Wed Dec 03, 2014 10:32 am

push data to sql server using ajax call

I am creating a app for ios device and pushing data to sql server using this code
var data={

"SequenceDate":"2014-11-17",
"SequenceTime":"14:05",
"Parameter":[{
"ParameterID": "6",
"ParameterValue": "678678"
},
{
"ParameterID": "4",
"ParameterValue": "DefaultDiversion"
},
{
"ParameterID": "5",
"ParameterValue": "tyutu"
},
{
"ParameterID": "2",
"ParameterValue": "Ram"
},
{
"ParameterID": "7",
"ParameterValue": "uytu"
},
{
"ParameterID": "3",
"ParameterValue": "4"
}] ,
"fullData": [
{
"CharType":"1",
"CharID":"2",
"SubGroupSize":"1",
"VSubgroup": [ {
"SubGroupValue": "99.00"
}],
"ASubgroup":[],
"SubgroupCauseID":"10",
"SubgroupActionID":"11",
"SubgroupNote":"fhfh"
}]};
/*

$.ajax({

Code: Select all

url: '[url=https://192.168.2.67/SPC.WebService/WSService.svc/PushSequenceChart]https://192.168.2.67/SPC.WebService/W...[/url]', 
type: 'POST', 
crossDomain: true, 
contentType:'application/json', 

/* data: JSON.stringify(data),*/
data:data,
dataType:'json',
success:function(data)
{
alert(data);
},
error:function(data){

Code: Select all

     alert("not getting push"+JSON.stringify(data)); 
 } 

});

but i am getting error and also tried make a call to server using inbuilt appery service using proxy but it did not work. would u tell me that code is correct make call to server.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

push data to sql server using ajax call

Hello -

Request depends on the parameters it takes for certain endpoint, since it is your server, you should better know what parameters it requires.

Madhurendra Singh
Posts: 0
Joined: Wed Dec 03, 2014 10:32 am

push data to sql server using ajax call

but there is no request parameter .only we have to push json object(as above ) .

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

push data to sql server using ajax call

Hello Madhurendra,

Sorry for the radio silence here.
It should work in this case.
Hard to say for us, why you can't reach your server.

Return to “Issues”