The ADO.NET provider for Kintone provides a wide range of features that enable connectivity to Kintone from .Net applications. The documentation will help you understand the C1.AdoNet.Kintone namespace, which includes all the available classes that can be used to connect and retrieve data from a Kintone service.
DataConnectors are mostly used in combination with other ComponentOne components, such as DataEngine and FlexPivot. For a better understanding of this application, please see the Kintone Sample live demo.
The procedure below describes how to use the DataConnector in a console application within Visual Studio.
The ADO.NET provider for Kintone can be used in any application. In this guide, a console application is created:
To use the ADO.NET provider for Kintone in an application, the respective NuGet package should be added:
Follow the steps provided below to learn and implement data retrieval using the ADO.NET provider for Kintone.
C# |
Copy Code |
---|---|
const string Username = "***********"; const string Password = "************"; const string Url = "https://xg0w2.kintone.com"; |
C# |
Copy Code |
---|---|
string kintoneConnection = string.Format("Username={0};Password={1};Url={2}", Username, Password, Url); C1KintoneConnection conn = new C1KintoneConnection(kintoneConnection); C1KintoneCommand comm = new C1KintoneCommand(conn); comm.CommandText = "Select * from Products"; conn.Open(); using (C1KintoneDataAdapter a = new C1KintoneDataAdapter(comm)) { //Filling Data Table with the help of adapter DataTable t = new DataTable(); a.Fill(t); //Printing the fetched table data on console foreach (DataRow dataRow in t.Rows) { foreach (var item in dataRow.ItemArray) { Console.Write(item + " - "); } Console.WriteLine(); } } |