Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

automation server can't create object ActiveXObject jsp

835297May 17 2011 — edited May 17 2011
Hi

Below code snippet is completely working fine on IE when it is embedded in an HTML document.

var fso = new ActiveXObject("Scripting.FileSystemObject"); // creating a Scripting FileSystemObject.
var fh = fso.CreateTextFile("data.xml", true); // creating a file handler variable which is pointing to the given file.
fh.WriteLine(str); // Writing str value to file through file handler variable.
fh.Close(); // closing the file handler object.

But when I am embedding the same snippet in a JSP and trying execute on the same IE, it is failing at ""var fso = new ActiveXObject("Scripting.FileSystemObject");"" and throwing a javascript error as "automation server can't create object".

I have gone through google and could not identify what might gone wrong.

if some had come across the same scenario, pls throw some light on this.


Thanks.

Comments

Solomon Yakobson
Answer
WITH SAMPLE(ID,FirstName,LastName,City,State,Phone,SystemDate)
  AS (
      SELECT 1,'John','Doe','ABC','FL','5555555555',DATE '2020-12-01' FROM DUAL UNION ALL
      SELECT 1,'John','Doe','ABC','FL','8888888888',DATE '2020-12-01' FROM DUAL UNION ALL
      SELECT 2,'Jane','Smith','XYZ','CA','9999999999',DATE '2020-12-01' FROM DUAL
     )
SELECT  ID,
        FirstName,
        LastName,
        City,
        State,
        LISTAGG(Phone,',') WITHIN GROUP(ORDER BY Phone) Phone,
        SystemDate
  FROM  SAMPLE
  GROUP BY ID,
           FirstName,
           LastName,
           City,
           State,
           SystemDate
/

        ID FIRS LASTN CIT ST PHONE                 SYSTEMDAT
---------- ---- ----- --- -- --------------------- ---------
         1 John Doe   ABC FL 5555555555,8888888888 01-DEC-20
         2 Jane Smith XYZ CA 9999999999            01-DEC-20


SQL>

SY.

Marked as Answer by User_OMEF8 · Dec 5 2020
User_OMEF8

Wow! That did the trick. Thanks so much! I did not realize it would be something as simple as that.

1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 14 2011
Added on May 17 2011
1 comment
1,626 views