Microsoft KB Archive/304109

= BUG: Database Lookup Functoid Does Not Work with Oracle Database =

Article ID: 304109

Article Last Modified on 11/5/2003

-

APPLIES TO


 * Microsoft BizTalk Server 2000 Standard Edition

-



This article was previously published under Q304109



SYMPTOMS
If you configure a BizTalk Map to use the Database Lookup functoid to connect to an Oracle Database, the following error may occur when you attempt to test the map:

ORA-00903: invalid table name

Also, the Database Lookup functoid will fail to retrieve records from an Oracle database when called from a map that is used in a BizTalk Channel.



CAUSE
The BizTalk Server Database Lookup Map functoid hard codes brackets around the table name that is used in the functoid's SELECT statement. Oracle does not support the use of brackets surrounding table names in SELECT statements.



RESOLUTION
To work around this problem, substitute scriptor functoids for the BizTalk Database Lookup and Value Extractor functoids. To do this, perform the following steps:

Create a scriptor functoid that provides the functionality of the Database Lookup functoid
 Copy the script code used in the Database Lookup functoid into a scriptor functoid.  Comment out the following line of code in the scriptor: Set ArrRecordSet(Index).ActiveConnection = Nothing   Remove the square brackets contained in the following ADO SELECT statement that is contained in the scriptor code: strQuery = &quot;SELECT * FROM [&quot; + CStr(Table) + &quot;] WHERE &quot; + CStr(Column) + &quot; = &quot; + &quot;'&quot; + CStr(Value) + &quot;'&quot;  The Database Lookup functoid requires four input parameters; however, the FctDBLookup function used by the Database Lookup script requires a fifth Index parameter that is supplied by the BizTalk Messaging engine when the Database Lookup functoid is called. To create a scriptor functoid that provides the same functionality that the Database Lookup functoid provides, you must manually provide the Index input parameter, because the BizTalk Messaging engine does not provide the index value to a generic scriptor functoid.

After you copy the script code that is used in the Database Lookup functoid into the scriptor functoid, insert these five input parameters in the following order:

 The index value The lookup value</li> The database connection string</li> The table name</li> The column name for the lookup value</li></ol>

Although you can set the index value to any positive integer value, this index value should be set to 0 for optimal performance.</li></ol>

After you complete the previous steps, you will have a working copy of a scriptor that provides the same functionality as the Database Lookup scriptor. You must then create additional scriptors to mimic the functionality of the Value Extractor functoid, because the Value extractor functoid only accepts input from the Database Lookup functoid and will not accept input from a scriptor functoid.

Create scriptor functoids that provide the functionality of the Value Extractor functoid
<ol> Copy the script code used in the Value Extractor functoid into a scriptor functoid.</li> If more than one Value Extractor functoid is needed, copy the script code that is used in the Value Extractor functoid into additional scriptor functoids. If more than one scriptor functoid is used in place of the Value Extractor functoid, you must change the name of the FctDBValueExtract function in subsequent scriptor functoids, otherwise you will not be able to save the functoid into the map, and the following error message will be displayed when you attempt to save the scriptor:

The function name &quot;fctdbvalueextract&quot; is already in use. Rename the function to another name.

</li> Insert these two input parameters into the scriptor in the following order:

<ol style="list-style-type: lower-alpha;"> A link to the Scriptor functoid that you created in step 1</li> The column name for the field from which you want to extract data</li></ol> </li></ol>

After you complete these steps, you will have a working copy of a scriptor that provides the same functionality as the Value Extractor functoid.

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in Microsoft BizTalk Server 2000.

Keywords: kbbug kbnofix KB304109

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.