I need to find the column info for a number of Oracle views using JavaScript. What I've tried is:
var conObj = new ActiveXObject('ADODB.Connection');
conObj.Open(conString);
sql = "DESC MyView";
rs1 = new ActiveXObject("ADODB.Recordset");
var commd = new ActiveXObject('ADODB.Command');
commd.ActiveConnection = conObj; //
commd.CommandText = sql;
commd.CommandType = 1;
rs1 = commd.Execute();
What I get is an error about the sql statement. I know the sql works in SQL Developer.
I can't use the alternative SELECT query as that returns an empty rowset - the view isn't populated when I need to run the query. Only the DESC returns the values.
Any ideas?
DESCis aSQL*Pluscommand. SO, you cannot use it.