Microsoft KB Archive/249224: Difference between revisions

From BetaArchive Wiki
(importing KB archive)
 
m (Text replacement - """ to """)
 
Line 53: Line 53:
If you are using physical and virtual directories in a catalog, you need to set the appropriate Scope in the SQL Statement.<br />
If you are using physical and virtual directories in a catalog, you need to set the appropriate Scope in the SQL Statement.<br />
<br />
<br />
By default an empty argument in Scope() is interpreted as &quot;/&quot;, so that all virtual directories are in Scope.<br />
By default an empty argument in Scope() is interpreted as "/", so that all virtual directories are in Scope.<br />
<br />
<br />
To include all virtual and physical directories in the Scope, the Select statement should look like the following:
To include all virtual and physical directories in the Scope, the Select statement should look like the following:
<pre class="codesample">Select Column from Scope('&quot;/&quot;,&quot;\&quot;')
<pre class="codesample">Select Column from Scope('"/","\"')
                 </pre>
                 </pre>
Here is a sample, how to code this statement in Visual Basic script:<br />
Here is a sample, how to code this statement in Visual Basic script:<br />


<pre class="codesample">SelectString = &quot;Select Column from Scope('&quot; + chr(34) + &quot;/&quot; + chr(34) + &quot;,&quot; + chr(34) + &quot;\&quot; + chr(34) + &quot;')&quot;
<pre class="codesample">SelectString = "Select Column from Scope('" + chr(34) + "/" + chr(34) + "," + chr(34) + "\" + chr(34) + "')"
                 </pre>
                 </pre>



Latest revision as of 13:51, 21 July 2020

Knowledge Base


Querying Physical Directories in Index Server Using SQL Returns Empty Recordsets

Article ID: 249224

Article Last Modified on 12/31/1999



APPLIES TO

  • Microsoft Index Server 2.0



This article was previously published under Q249224

SUMMARY

Querying physical directories in an Index Server using the OLEDB Provider MSIDX returns empty recordsets, because the default Scope only includes all virtual directories.

MORE INFORMATION

If you are using physical and virtual directories in a catalog, you need to set the appropriate Scope in the SQL Statement.

By default an empty argument in Scope() is interpreted as "/", so that all virtual directories are in Scope.

To include all virtual and physical directories in the Scope, the Select statement should look like the following:

Select Column from Scope('"/","\"')
                

Here is a sample, how to code this statement in Visual Basic script:

SelectString = "Select Column from Scope('" + chr(34) + "/" + chr(34) + "," + chr(34) + "\" + chr(34) + "')"
                


Additional query words: MSIDX scope OLEDB directory SQL

Keywords: kbinfo kbfaq KB249224