Neoview ODBC Drivers Manual (R2.5)

DescriptionClass Name
Enables the .NET Framework Data Provider for ODBC to help make sure that
a user has a security level sufficient to access an ODBC data source.
OdbcPermission
Associates a security action with a custom security attribute.OdbcPermissionAttribute
Provides data for the RowUpdated event.OdbcRowUpdateEventArgs
Provides data for the RowUpdating event.OdbcRowUpdatingEventArgs
Represents an SQL transaction to be made at a data source.OdbcTransaction
ODBC .NET Data Provider and the HP Neoview ODBC Driver
The HP Neoview ODBC Driver for Windows in conjunction with the .NET environment allows
access to HP Neoview SQL data through the ODBC .NET Data Provider. This diagram shows
the data flow from an application to the HP Neoview server:
To access the HP Neoview data source, the application must first establish a connection to the
data source using the OdbcConnection class from the ODBC .NET Data Provider.
After the connection is established, the application can use the OdbcCommand class to execute
a SQL statement to the data source. These commands can be used:
ExecuteReader — execute command for select action.
ExecuteNonQuery — execute command for insert and update action.
ExecuteScalar — execute command to retrieve a single value from the database.
To retrieve the data in the rows, the application uses the OdbcDataReader class. A simple Visual
Basic example follows:
public Sub ReadData(ByVal connectionString As String)
Dim queryString As String = "SELECT DISTINCT CustomerID FROM Orders"
Using connection As New OdbcConnection(connectionString)
Dim command As New OdbcCommand(querySting, connection)
connection.Open()
Dim reader As OdbcDataReader = command.ExecuteReader()
While reader.Read()
Console.WriteLine("CustomerID={0}", reader(0).ToString)
End While
' Call Close when done reading.
54 Accessing Neoview SQL Data From Microsoft ODBC .NET Data Provider