Page 1 of 1

push data to sql server using ajax call

Posted: Thu Jan 29, 2015 12:36 pm
by Madhurendra Singh

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.


push data to sql server using ajax call

Posted: Thu Jan 29, 2015 4:40 pm
by Illya Stepanov

Hello -

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


push data to sql server using ajax call

Posted: Fri Jan 30, 2015 4:53 am
by Madhurendra Singh

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


push data to sql server using ajax call

Posted: Mon Feb 02, 2015 11:12 am
by Evgene Karachevtsev

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.