Visual Basic Q&A

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘Oracle’

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

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

‘-2147217865 (80040e37)’: ORA-00942: table or view does not exist.
Resolution
The Data View is saving the view name in lower case to the Oracle database,but Oracle sees views all in upper case.

BUG: AbsolutePosition Property Returns Different Results

Symptoms
When you use the Remote Data Objects (RDO) version 2.0 in either VisualBasic 5.0 or Visual Basic 6.0, with an Oracle 7.x or 8.x database, usingthe Microsoft ODBC for Oracle driver, the AbsolutePosition property of therdoResultset object produces different results depending on the Cursorlocation as set by the CursorDriver property of the rdoConnection orrdoEnvironment object.
Using the rdUseServer cursor library, the AbsolutePosition property reportsthe last row in the Resultset. When tested a second time it returns thecorrect results based on its setting.
If you use either the rdUseODBC or rdUseClientBatch cursor libraries, theresults returned will always be correct.
NOTE: This code has also been tested against Microsoft SQL Server withouterror.
Resolution
The workaround is to use a MoveLast on the Recordset or not to use theCursorDriver properties of rdUseServer or rdUseIfNeeded when the results ofthe AbsolutePosition property must be accurate. The CursorDriver propertiesof rdUseOdbc and rdUseClientBatch produce accurate AbsolutePositionproperty results.

A LIKE statement does not return any data with Oracle character data type

Symptoms
When you use Microsoft OLE DB Provider (MSDAORA) or the OLE DB .NET Data Provider for Oracle, if you use a LIKE statement to search fixed-length character types, Oracle does not find any rows if their padding is different.
Resolution
If you type a value into a fixed-length field that is shorter than the length of that field, the value is padded with trailing spaces to fill the fixed length. When Oracle matches values for fixed-length fields, it matches the entire length of the string, including any trailing spaces.
NOTE: This behavior is not specific to ADO.NET and also occurs when you use Microsoft ActiveX Data Objects (ADO).