Quantcast
Channel: FLEXquarters.com Limited
Viewing all articles
Browse latest Browse all 313

[QODBC-Online] Sample Code for VB.NET with QODBC Online

$
0
0

Sample Code for VB.NET with QODBC Online

Sample Code of VB.NET to Create DataSet

Note: The following code is the minimal code required to create a DataSet from the SQL statement and attaches the dataset to a DataGrid.

Dim cnQODBC As System.Data.Odbc.OdbcConnection
Dim daQODBC As System.Data.Odbc.OdbcDataAdapter
Dim dsQODBC As System.Data.DataSet

cnQODBC = New System.Data.Odbc.OdbcConnection("DSN=QuickBooks Online Data")
cnQODBC.Open()
daQODBC = New System.Data.Odbc.OdbcDataAdapter("SELECT ListID, FullName, CompanyName FROM Customer", cnQODBC)
dsQODBC = New System.Data.DataSet

daQODBC.Fill(dsQODBC)
dgDataGrid.DataSource = dsQODBC
dgDataGrid.DataBind() 'May or maynot be required depending on where you put this code.


Viewing all articles
Browse latest Browse all 313

Trending Articles