Create a new VCL application and place the following components on the main form and connect them with each other
- TOraSession
- TConnectDialog
- TSmartQuery
- TOraDataSource
- TDbGrid
- TDbNavigator
- TButton
Code: Select all
OraSession.Options.StatementCache := True;
OraSession.Options.EnableLargeint := True;
OraSession.Options.EnableNumbers := True;
OraSession.Options.UnicodeEnvironment := True;
OraSession.Options.UseUnicode := True;
OraSession.Connect;
SmartQuery.DMLRefresh := True;
SmartQuery.Options.ReturnParams := True;
SmartQuery.KeyFields := 'COUNTRY_ID';
SmartQuery.SQL.Text := 'SELECT COUNTRY_ID, COUNTRY_NAME, REGION_ID FROM COUNTRIES';
SmartQuery.Options.CacheCalcFields := True;
SmartQuery.Options.CacheLobs := True;
SmartQuery.Options.DefaultValues := True;
SmartQuery.Options.DeferredLobRead := True;
SmartQuery.Options.StatementCache := True;
SmartQuery.Active := True;
- Click the button, connect to the HR sample schema
- On the navigator, click the "+" button, enter some sample data into the data grid record, and post changes
- On the navigator, click again the "+" button, enter some other sample data, and post changes
- Now the application freezes.