on/odc:ConnectionString").text setDatabase(sConnectionString); break; case "ODC.Cube": sCubeName = xmldocODC.documentElement.selectSingleNode("odc:Connection/odc:CommandText").text sConnectionString = xmldocODC.documentElement.selectSingleNode("odc:Connection/odc:ConnectionString").text setCube(sConnectionString, sCubeName); break; } } function setTable(sConnectionString, sCommandText, sCommandType) { sCommandType = sCommandType.toLowerCase(); ptPreview.ConnectionString = sConnectionString ptPreview.DataSource.MaxRecords = iNUMROWSDEFAULT_c; if (sCommandType.indexOf("default") >= 0 || sCommandType.indexOf("sql") >= 0 ) { ptPreview.CommandText = sCommandText } else if (sCommandType.indexOf("table") >= 0) { ptPreview.DataMember = scrubTableName(sConnectionString, sCommandText); } try { ptPreview.ActiveView.AutoLayout(); } catch (e) { if (e.description.length > 0) { alert (e.description); } } // if this is a "table" from an OLAP provider, cubeify. Otherwise, add the row count dropdown. if (sCommandText.indexOf("].[")>=0) { showDefaultCubeView(); } else { addMaxRowDropdown(); } configurePTPreview(); } function scrubTableName(sConnectionString, sDataMember) { var sOut; var i; var sConnectionStringLower = sConnectionString.toLowerCase(); sOut = sDataMember; if (sConnectionStringLower.indexOf("dsn=excel files")>=0 || sConne