访问xsjs文件我新的SAP HANA,并试图通过与以下URL网页浏览器,露出.xsjs文件数据:无法从浏览器
hostname:80<instance#>/workspace/session/a00/data/services/retrieveData.xsjs
不过,我收到以下错误,当我尝试访问它:
此链接似乎中断我们无法找到您尝试访问的资源。它可能拼错或当前不可用
这些都是我在项目资源管理器中创建的文件:
MYSCHEMA.hdbschema
schema_name="MYSCHEMA"
trendsData.hdbtable
table.schemaName = "MYSCHEMA";
table.tableType = COLUMNSTORE;
table.description = "NewDataSet Order trendsData";
table.columns = [
{name= "C"; sqlType = NVARCHAR; nullable = true; length=10; },
{name= "D"; sqlType = VARCHAR; nullable = true; length=5; },
{name= "DU"; sqlType = NVARCHAR; nullable = true; length=20; },
{name= "SA"; sqlType = DECIMAL; nullable = true; length=30; },
{name= "I"; sqlType = DECIMAL; nullable = true; length=30; },
{name= "G"; sqlType = DECIMAL; nullable = true; length=30; },
{name= "G"; sqlType = DECIMAL; nullable = true; length=20; },
{name= "STR"; sqlType = DECIMAL; nullable = true; length=30; }
];
table.primaryKey.pkcolumns = ["INVENTORY"];
orderId.hdbsequence
schema="MYSCHEMA";
start_with=2000000;
cycles=false;
depends_on_table="workspace.session.a00.data::trendData";
retrieveData.xsjs
$.response.contentType="text/html";
var output = "Helloworld";
var conn = $.db.getConnection();
var pstmt = conn.prepareStatement("select * from trendData");
var rs = pstmt.executeQuery();
if (!rs.next())
{
$.response.setBody("Failed to retrieve data");
$.response.status = $.net.http.INTERNAL_SERVER_ERROR;
}
else
{
output=output + "This is the respose from my SQL: "
+ rs.getString(1);
}
rs.close();
pstmt.close();
conn.close();
$.response.setBody(output);
上述所有文件都成功地承诺,并与出任何错误激活。仍然,错误发生在webrowser。