在过去的48个小时里,我突然间所有从数据库中导入数据到工作表的查询均失败,并显示以下错误:
Google Spreadsheet无法保存ID为[--ID--]的文档:文档 太大。
数据库的大小没有变化。 大约有1100行要拉。它已经工作了好几年了。 甚至在Google上找不到此错误。
知道要做什么吗?
Google表格中的脚本代码:
function updateS() {
// Replace the variables in this block with real values.
var ServerIP = 'zzzzzzz';
var SQL_Port = 'zzzzzzzzzz';
var SQL_Usr = 'zzzzzzzzz';
var SQL_Pwd = 'zzzzzzzz';
var SQL_DB = 'zzzzzzzzzzzzz';
var connectorInstance = 'jdbc:mysql://' + ServerIP+':'+SQL_Port;
var ConnectString = connectorInstance+'/'+SQL_DB;
var conn = Jdbc.getConnection(ConnectString, SQL_Usr, SQL_Pwd);
//Executes the queries
var execStmt = conn.createStatement();
//Gets and Sets the Current Spreadsheet as Active
var doc = SpreadsheetApp.getActiveSpreadsheet();
doc.setActiveSheet(doc.getSheetByName('Sheet1'));
var mysqlQuery = execStmt.executeQuery("call my_call()"); //table name is product
var cell = doc.getRange('A2');
// loop through result object, setting cell values to database data
var row = 0;
while(mysqlQuery.next()) {
for(var i=0; i<13; i++) { // 3 fields per record
cell.offset(row, i).setValue(mysqlQuery.getString(i+1));
}
row++;
}
mysqlQuery.close();
execStmt.close();
conn.close();
}