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 8885781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:23:42+00:00 2026-06-14T21:23:42+00:00

Need to send the values of a Sqlite table to the server via an

  • 0

Need to send the values of a Sqlite table to the server via an AJAX call to a web service. I can’t figure out how to package the rows of this table in a way that the web service will accept it.

Web Method Signature

[WebMethod]
    public void CVW(string[][] qAndA)
    {}

Client Side

var qAndA = new Array();
tx.executeSql("Select * From CVW Where CallNumber=?", [call], function (tx, result) {
                        var i = 0;
                        $.each(result.rows, function () {
                            qAndA[i] = result.rows.item(i);
                            i++;
                        });
$.ajax({
                            type: "POST",
                            dataType: "json",
                            contentType: "application/json",
                            url: "Service.asmx/CVW",
                            data: JSON.stringify({ qAndA: qAndA }),
                            success: function (data) {
                            },
                            error: function (xhr, status, error) {
                                var err = eval("(" + xhr.responseText + ")");
                                alert(err.Message);
                            }
                        });
                    }, onSQLError);

This gives me No parameterless constructor defined for type System.String. I’ve tried changing the web method parameter to just string[] and List and same thing.

When I look at what is being sent in Fire Bug I see that it is sending over as Object[object Object][object Object][object Object]... for as many [object Object] as there are rows returned in the Sqlite Query. What is the corresponding type in C# that I can use as my parameter type?

EDIT: Final Solution

In the javascript I had to change

data: JSON.stringify({ qAndA: qAndA }),

to

var json = JSON.stringify(qAndA);
data: JSON.stringify({ qAndA: json });

and changed the Web Method thusly

 [WebMethod]
    public void CVW(string qAndA)

JavaScriptSerializer ser = new JavaScriptSerializer();
List<CVWQuestion> list = ser.Deserialize<List<CVWQuestion>>(qAndA);

[Serializable]
public class CVWQuestion
{
    public string CallNumber {get;set;}
    public string Question { get; set; }
    public string P1 { get; set; }
    public string P2 { get; set; }
    public string P3 { get; set; }
    public string P4 { get; set; }
    public string P5 { get; set; }
    public string P6 { get; set; }
}
  • 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-14T21:23:43+00:00Added an answer on June 14, 2026 at 9:23 pm

    Please see my edited post for the code that finally worked for me. Found in large part to @SteveB, but never submitted as answer so I couldn’t accept it.

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

Sidebar

Related Questions

i need to find out automationid for key board values? how to send keystrokes
I want to send a couple of values to a web server from my
I want to send a couple of values to a web server from my
Like below,I need to send name and psw value to server side, and get
I need send certain attributes(say, human readable user name) from server to client after
My program generates a list at runtime of values. I need to send a
I need to send a command to a GPIB instrument and I can do
I need to send values (the input from a Textbox) as parameters to a
I'm using jcrop to crop my photos and need to send the current values
I need to send out email attachment as body of the email. It is

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.