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

  • Home
  • SEARCH
  • 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 7703445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:27:38+00:00 2026-05-31T23:27:38+00:00

I would like to write a small Google Chrome extension in which I use

  • 0

I would like to write a small Google Chrome extension in which I use gooles fusion tables as a central data base.

Using existing tables and data (added via the GooleDoc-Webside) works quite fine (SELECT, SHOW TABLES, DESCRIBE) but if I try to do any changes (for this I need a “POST” request). I always get the following error: “Missing sql parameter.” I have no Idea why this happens. I tried already alot (e.g. “create table test3(A:number,B:number)”, insert .)

The code I wrote is the following:

function Fusion(readyCallback) {
    var myObject = {
        URL : "https://www.google.com/fusiontables/api/query",
        authToken : null,
        doGET : function(command,callback) {
            var xmlhttp = new XMLHttpRequest();
            xmlhttp.open("get"
                        ,this.URL+"?sql="+encodeURI(command)
                        ,true);
            xmlhttp.setRequestHeader("Authorization"
                                    ,"GoogleLogin auth=" + this.authToken);
            xmlhttp.onreadystatechange = function() { callback(xmlhttp.responseText); }
            xmlhttp.send();
        },
        doPOST : function(command,callback) {
            var xmlhttp = new XMLHttpRequest();
            xmlhttp.open("post"
                        ,this.URL
                        ,true);
            xmlhttp.setRequestHeader("Authorization"
                                    ,"GoogleLogin auth=" + this.authToken);
            xmlhttp.onreadystatechange = function() { callback(xmlhttp.responseText); }
            xmlhttp.send("sql="+encodeURI(command));
        }
    }
    // client login authentification
    var email    = "XXX@gmail.com";
    var password = "XXX";
    var loginURL = "https://www.google.com/accounts/ClientLogin?accountType=GOOGLE&Email="
              + encodeURI(email) + "&Passwd=" + encodeURIComponent(password) 
              + "&service=fusiontables&Source=testing";
    var xmlhttp = new XMLHttpRequest();
    xmlhttp.open("get",loginURL,true);
    xmlhttp.onreadystatechange = function() {
        var tmp = xmlhttp.responseText;
        tmp = tmp.slice(tmp.search("Auth=") + 5, tmp.length);
        tmp = tmp.replace(/\n/g, "");
        tmp = tmp.replace(/\r/g, "");
        myObject.authToken = tmp;
        console.log("authentifiaction token status: "+xmlhttp.statusText);
        if (readyCallback) {
            readyCallback();
        }                                  
    };
    xmlhttp.send();

    return myObject;
}

If I for example try to do something like this

mf.doPOST("INSERT INTO 2664928(ID,Text,Number) VALUES (2,'Hallo',3)",mc)

or this

mf.doPOST("INSERT INTO 2664928(col4,col0,col1) VALUES (2,'Hallo',3)",mc)

with a table, described by this

column id,name,type
col4,ID,number
col0,Text,string
col1,Number,number

I keep getting this error (the same when I try to create a table)

Any suggestions? I am realy confused!

  • 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-05-31T23:27:39+00:00Added an answer on May 31, 2026 at 11:27 pm

    The message about the “Missing sql parameter.” seems not to be the real error.

    When I correctly understood the issue, it is currently not possible to POST data to Fusion Tables using JavaScript. If GFT would send to appropriate CORS headers for POST requests, it could actually work. But this is not the case as of now.

    See issue 554 (http://code.google.com/p/fusion-tables/issues/detail?id=554).

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

Sidebar

Related Questions

I would like to write a small program in C# which goes through my
I'm trying to write a small command launcher application, and would like to use
I would like to write some data to a file in Ruby. What is
I would like to write a macro for Notepad++ which should replace char1, char2,
I would like to write a small piece of program that launches threads, consumes
I would like to write a small notification script using python watchdog for windows.
I would like to write the following code in c#. a) small console application
I would like to write a rather simple content application which displays a list
I would like to write to a text file, but I have small problem.
I would like to write a small html file that would run locally and

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.