![]() |
VOOZH | about |
This article demonstrates using the CData ADO.NET Provider for Google Data Catalog in PowerBuilder, showcasing the ease of use and compatibility of these standards-based controls across various platforms and development technologies that support Microsoft .NET, including Appeon PowerBuilder.
This article shows how to create a basic PowerBuilder application that uses the CData ADO.NET Provider for Google Data Catalog to retrieve data.
ProjectId=YourProjectId;InitiateOAuth=GETANDREFRESH;
Google Data Catalog uses the OAuth authentication standard. Authorize access to Google APIs on behalf on individual users or on behalf of users in a domain.
Before connecting, specify the following to identify the organization and project you would like to connect to:
Click the project selection drop-down, and select your organization from the list. Then, click More -> Settings. The organization ID is displayed on this page.
Find this by navigating to the cloud console dashboard and selecting your project from the Select from drop-down. The project ID will be present in the Project info card.
When you connect, the OAuth endpoint opens in your default browser. Log in and grant permissions to the application to completes the OAuth process. For more information, refer to the OAuth section in the Help documentation.
<DataGrid AutoGenerateColumns="False" Margin="13,249,12,14" Name="datagrid1" TabIndex="70" ItemsSource="{Binding}">
<DataGrid.Columns>
<DataGridTextColumn x:Name="idColumn" Binding="{Binding Path=Id}" Header="Id" Width="SizeToHeader" />
<DataGridTextColumn x:Name="nameColumn" Binding="{Binding Path=Type}" Header="Type" Width="SizeToHeader" />
...
</DataGrid.Columns>
</DataGrid>
Once the visual elements have been configured, you can use standard ADO.NET objects like Connection, Command, and DataAdapter to populate a DataTable with the results of an SQL query:
System.Data.CData.GoogleDataCatalog.GoogleDataCatalogConnection conn conn = create System.Data.CData.GoogleDataCatalog.GoogleDataCatalogConnection(connectionString) System.Data.CData.GoogleDataCatalog.GoogleDataCatalogCommand comm comm = create System.Data.CData.GoogleDataCatalog.GoogleDataCatalogCommand(command, conn) System.Data.DataTable table table = create System.Data.DataTable System.Data.CData.GoogleDataCatalog.GoogleDataCatalogDataAdapter dataAdapter dataAdapter = create System.Data.CData.GoogleDataCatalog.GoogleDataCatalogDataAdapter(comm) dataAdapter.Fill(table) datagrid1.ItemsSource=table.DefaultView
The code above can be used to bind data from the specified query to the DataGrid.
Download a free trial of the Google Data Catalog Data Provider to get started:
Download NowLearn more:
👁 Google Data Catalog IconRapidly create and deploy powerful .NET applications that integrate with Google Data Catalog.