Rowset Viewer Example
This example describes how to connect to a provider, execute a command, and use IOpenRowset. It may be necessary to configure the ODBC data source before connecting to the provider. Use the ODBC Data Source Administrator to create or select a File DSN and supply the UserID and Password as appropriate.
To connect to a provider:
Start RowsetViewer.exe.
From the File menu, choose Full Connect.
Select MSDASQL as the provider and select your ODBC data source for the DataSource parameter.
Click OK.
To execute a command:
In the top pane of the MDI child window, type a query — for example:
SELECT * FROM CUSTOMERS
Click the SQL button on the toolbar to run ICommand::Execute, or open the Command menu, select ICommand, and then click Execute. The ICommandExecute::Execute dialog box appears.
Click OK.
To use IOpenRowset:
In the top pane of the MDI child window, type the name of a table in your data source. For example, CUSTOMERS.
Make sure you are connected to a provider and click the Execute (!) button, or open the Session menu, select IOpenRowset, and then click IOpenRowset::Open Rowset.