title: ODBC Connection Dynamic From Clause
body: <pre><code>ODBC;DSN=Test;UID=;PWD=;SourceDB=\\server\folder\Test\prime.dbc;SourceType=DBC;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;
  </code></pre>
  
  <p>Then the functional static query that uses that connection.  There are 5 tables in prime.dbc.</p>
  
  <pre><code>Select field1, field2 field3
  From Table1
  </code></pre>
  
  <p>Now based on the function below I want to feed funTestShipUic to the FROM clause instead of the static Table1.</p>
  
  <pre><code>Public Function funTestShipUic() As String
  
     funTestShipUic = lngTestShipUic
  
  End Function
  </code></pre>
  
  <p>I have tried ...</p>
  
  <pre><code>Select field1, field2 field3
  From funTestShipUic() 
  </code></pre>
  
  <p>But I get ODBC--call failed.  ODBC Visual FoxPro Driver Invalided subscript reference.</p>