Microsoft KB Archive/196587

= BUG: Data View: New Oracle Views Incorrectly Named During Save =

Article ID: 196587

Article Last Modified on 1/8/2003

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q196587



SYMPTOMS
After creating and saving a new view with the Data view tool, trying to access the newly created view results in the following run-time error:

'-2147217865 (80040e37)': ORA-00942: table or view does not exist.



CAUSE
The Data View is saving the view name in lower case to the Oracle database, but Oracle sees views all in upper case.



RESOLUTION
Delete the View that is causing the error. Create the view again. Save and name the view with the same name but use all upper case letters.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.



Steps to Reproduce Behavior
 Start Visual Basic 6.0 and create a Standard EXE project. From the Project menu, choose Add Data Environment.  Right-click Connection1 and choose Properties. In the Data Link Properties dialog box, click the Connection tab. In step 1, select "Use connection string" and enter a valid Server name, UserID, and Password to your Oracle Data Source in the Connection string text box. Here is an example of a connection string:      Server: dseOracle UserID: Scott Password: Tiger

After you enter the connection sting, click OK.  From the View menu choose "Data View Window". Click the "+" next to the folder labeled "Connection1" to expand the folder. When the folder expands, right-click the folder named "View", and then select New View.  In the space provided enter a valid SQL statement, such as the following: SELECT * FROM EMPLOYEES

</li> Click the Close button in the top right corner of the form. When prompted to save, click Yes. Save the view, name it vEmp and then click OK.</li> Open the DataEnvironment. In the Project1 DataEnvironment dialog box, right-click Connection1 and choose Add Command.</li> Right-click Command1 to open the Command1 Properties dialog box. In the Command1 Properties dialog box, click the General tab. Select the Database Object option button, click the down arrow of the text box and then select View.</li> Click the drop-down arrow of the Object Name textbox, select vEmp or .vEmp, and then click OK.</li> From the Project menu, choose Components and select the Microsoft Datagrid Control 6.0 (OLEDB). Next, place a Datagrid and a Command button on the form.</li>  Enter the following code into the Click event of the Command button: Set DataGrid1.DataSource = DataEnvironment1 DataEnvironment1.Commands("Command1").CommandText = "vEmp" DataEnvironment1.Command1 DataGrid1.DataMember = "Command1" DataGrid1.Refresh

</li> Run the project and click the Command1 command button.

RESULT: The following error occurs:

Run-time error '-2147217865 (80040e37)': ORA-00942: table or view does not exist.

This error also appears if the view is executed in SQL Plus.</li></ol>

Keywords: kbbug kboracle kbdataenv kbdataview kbpending KB196587

-

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

© Microsoft Corporation. All rights reserved.