Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8842549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:59:11+00:00 2026-06-14T10:59:11+00:00

this question could be completely redundant and I apologize for that. But I have

  • 0

this question could be completely redundant and I apologize for that. But I have this code in my android app using flash builder to send data to the webservice

     var ResponseValue:int = 1;
    var QuestionID:int = data.QuestionID;
  ResultsQuestion = new ArrayCollection();
                            ResultsQuestion.addItem({"ResultSEQ":10000});
                            ResultsQuestion.addItem({"QuestionID":QuestionID});
                            ResultsQuestion.addItem({"ResponsePromptID":chk1.name});
                            ResultsQuestion.addItem({"ResponseValue":ResponseValue});
                                                    var service:HTTPService = new HTTPService();
service.url = "http://IPaddress:443/InsertData/Service1.asmx/HelloWorld";

//service.url = "http://localhost/InsertData/InsertData/Service1.asmx/HelloWorld";
service.method="POST";
var parameters:Object = new Object();
parameters["ResponsePromptID"]= ResultsQuestion.getItemAt(2).ResponsePromptID;
parameters["QuestionID"]= ResultsQuestion.getItemAt(1).QuestionID;
parameters["ResponseValue"]= ResultsQuestion.getItemAt(3).ResponseValue;

service.send(parameters);

And I want to insert this data returned into a SQLServer. And for that I have written this webservice.

 [WebMethod]
        public string HelloWorld()
        {
            string Message;
            string MyConString = "Data Source=.\\SQLEXPRESS;Server=nameof server;Database=dbname;User ID=id;Password=password;Trusted_Connection=False; ";

  System.Data.SqlClient.SqlConnection DbConnection = new System.Data.SqlClient.SqlConnection(MyConString);
            DbConnection.Open();
            SqlCommand DbCommand = DbConnection.CreateCommand();
         string QuestionID= System.Web.HttpContext.Current.Request.Params["QuestionID"];

         // string QuestionID = "89";
            string ResultSEQ = "1999";
           string ResponsePromptID =System.Web.HttpContext.Current.Request.Params["ResponsePromptID"];
    //  string ResponsePromptID ="343";
            string ResponseValue = "12";
            DbCommand.CommandText = "Insert into [dbo].[tablename] (ResultSEQ,QuestionID,ResponsePromptID,ResponseValue) Values( @ResultSEQ,@QuestionID,@ResponsePromptID,@ResponseValue)";
            DbCommand.Parameters.AddWithValue("@ResultSEQ", ResultSEQ);
            DbCommand.Parameters.AddWithValue("@QuestionID", QuestionID);
            DbCommand.Parameters.AddWithValue("@ResponsePromptID", ResponsePromptID);
            DbCommand.Parameters.AddWithValue("@ResponseValue", ResponseValue);

            int result = DbCommand.ExecuteNonQuery();
            if (result == 1)
            {
                Message = "1";

            }
            else
            {
                Message = "2"; ;
            }
            DbConnection.Close();

            return Message;
        }
    }

But, I don’t see any data inserted and I don’t see any error. So, I am not sure what is wrong. Probably this entire this is wrong. But, please tell me what is the problem with this code? And is there a way to see the data sent by my flex HTTPService?
Thank you so much!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T10:59:12+00:00Added an answer on June 14, 2026 at 10:59 am

    Well I used Webserivce in flex instead of the HTTP Service, since I was working with a .net Webservice. And that worked like a charm.

    <fx:Declarations>
        <s:WebService id="ws" wsdl="http://uraddress:443/TestWebserives/Service1.asmx?WSDL">
            <s:operation
                name="HelloWorld"/>
        </s:WebService>
                        </fx:Declarations>
    

    And all I had to do in the event where I wanted to send the data to my webservice was to just have something like this

    ws.HelloWorld(ResultsQuestion.getItemAt(0).ResultSEQ,ResultsQuestion.g etItemAt(1).QuestionID,ResultsQuestion.getItemAt(2).ResponsePromptID,R esultsQuestion.getItemAt(3).ResponseValue);
    

    Where ResultsQuestion is a Array Collection.

    But, I am not sure what is the disadvantage/advantage of using Webservice over HTTPSerive?
    Thank you

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Ruby on Rails, but I think this question could be applied
I'm completely re-formulating this question having learned that I was originally off track but
This question could be a can of worms, but I've always wondered if it
I understand that this question could be answered with a simple sentence and that
Take the following method (written in Ruby but this question could be applied to
I have this question: How could I call a codebehind method from jquery? I
I tried to find the answer to this question but could not, to be
This question is related to my ASP.NET MVC 2 development, but it could apply
I have a webapp written in PHP using a MySQL database backend. This question
i have already asked this question on asp.net forum, could not find any satisfactory

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.