Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : Do you have any sample code for VB.NET and FlexODBC?Search Forum

Forum Home > FlexODBC - ODBC Driver for DataFlex Embedded DBMS > FlexODBC Frequently Asked Questions

 New Topic 
 
 Post Reply 
 Do you have any sample code for VB.NET and FlexODBC? 
 Author   Message 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-08-18 08:28:57

The following code is the minimal code required to create a DataSet from the SQL statement and attaches the dataset to a DataGrid using the AllHits sample data supplied with FlexODBC:

Dim cnDODBC As System.Data.Odbc.OdbcConnection
Dim daDODBC As System.Data.Odbc.OdbcDataAdapter
Dim dsDODBC As System.Data.DataSet

cnDODBC = New System.Data.Odbc.OdbcConnection("DSN=DataFlex Test32")
cnDODBC.Open()
daDODBC = New System.Data.Odbc.OdbcDataAdapter("SELECT Weeks, Title, Artist FROM AllHits order by Artist", cnDODBC)
dsDODBC = New System.Data.DataSet

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

 

  Top 
 New Topic 
 
 Post Reply 

Jump to