RE: Populating a Custom Table using Web Services or Scripting
Frode,
I have managed to get this working which is great. The problem I have now is that I want to read from the table but I cannot seem to get this working.
I have a custom table called y_richtest with a single Text column called x_name which I have successfully written data to.
I want to read all the data out and I thought I could do it as below:
SearchEngine se1;
se1.addField("y_richtest.x_name");
se1.execute();
String names="";
for (se1.execute(); !se1.eof(); se1.next())
{
names = names + se1.getField(0) + " ";
}
But when I execute the script I get the following error:
EjScript::RunTimeException: An exception occurred in script: "Parser embedded ejscript" at: line 17, char 9 Original exception: NetServerException: NetServer exception: Service call Archive.GetArchiveListByColumnsWithHeader failed with exception Archive.GetArchiveListByColumnsWithHeader Table y_richtest does not exists in the database and has no registered handler.
Could you possibly point me in the right direction?
As an extra to this post, If I run this code, it does return data as expected:
ExtraTable et = getExtraTable("y_richtest");
et.load(10);
print(et.getValue("x_name"));
Many thanks
Rich